Boost logo

Boost Users :

From: Mateusz Łoskot (mateusz_at_[hidden])
Date: 2006-03-03 11:20:59


Hi Gennadiy,

Gennadiy Rozental wrote:
> "Mateusz Loskot" <mateusz_at_[hidden]> wrote in message
> news:44064B20.4050504_at_loskot.net...
>
>>Then, I tried to run rest of examples, unit_test_example_02.cpp
>>and unit_test_example_03.cpp, as explained above.
>>And here comes my problems I noticed with unit_test_example_02
>>and unit_test_example_03.
>>When I try to run compiled example from unit_test_example_02.cpp I get
>>memory leaks detected:
>>[...]
>
> I couldn't explain what you are expiriencing. Just one suggestion: make sure
> you link with proper library. Autolinking inforce proper name. Try to
> disable it (define BOOST_TEST_NO_LIB) and name library explicetly.

I tested with autolinking disabled and I tried to use
libboost_unit_test_framework-vc80-mt-*.lib libraries explicitly.
I still get the same memory leaks dump.
The only difference is that when I use UTF library built
in debug mode (-gd) I get more info (here I test UTF example 03):

D:\temp\utf_test>debug\utf_test.exe
Running 2 test cases...
./utf_test.cpp(11): error in "force_division_by_zero": check false failed
Detected memory leaks!
...
... here memory dump

but when I use UTF library built in non-debug mode I get only:

D:\temp\utf_test>debug\utf_test.exe
Running 2 test cases...

In both cases I get Windows dialog box with information about crash.

I also rebuilt UTF library using -d2 bjam option and I compared compiler
options used by bjam with options I use to build examples in VC++ 8.0.
In both cases I use same options, double checked.

Do you have any idea where may be the problem that I get this memory
dump when I use UTF lib built with bjam?
When I build UTF library with VC++ 8.0 project everything works well.
Simply, UTF seems to not to catch bugs in test examples properly.

Here, in example 03, I checked where debuger stops when I push Debug
button in the crash dialog box:

// reports 'unknown location(0): fatal error in
"force_division_by_zero": integer divide by zero'
i = i / j; // <------ HERE DEBUGER STOPS

but it should be handled by UTF as described in comments above,
shouldn't it?

Thanks for any help

Cheers

-- 
Mateusz Łoskot
http://mateusz.loskot.net

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net