Boost.Test and mpatrol
Hi, there seems to be a problem if Boost.Test and mpatrol are used together. The following program hangs and constantly uses more and more memory. How to reproduce the behaviour: System: Windows XP Prof. SP2 MS Visual Studio 7 mpatrol-1.4.8 boost-1.33.1 <code> #define BOOST_AUTO_TEST_MAIN #include <boost/test/auto_unit_test.hpp> BOOST_AUTO_TEST_CASE(testA) { int* a = new int[100]; } </code> After "sourcing" vsvars32.bat the following command was used to compile & link the sample. cl -Zi -EHsc -ML -Ic:\boost\include\boost-1_33_1 test.cpp -link -libpath:c:\local\lib mpatrol.lib -libpath:c:\boost\lib libboost_unit_test_framework-vc7-s.lib Static linkage of mpatrol results in the same behaviour: cl -Zi -EHsc -ML -Ic:\boost\include\boost-1_33_1 test.cpp -link -libpath:c:\local\lib libmpatrol.lib imagehlp.lib -libpath:c:\boost\lib libboost_unit_test_framework-vc7-s.lib Same with -MT, mpatrolmt.lib and libboost_unit_test_framework-vc7-mt-s.lib The combinations -MLd, mpatrol.lib and libboost_unit_test_framework-vc7-sgd.lib -MTd, mpatrolmt.lib and libboost_unit_test_framework-vc7-mt-sgd.lib do not result in the erroneous behaviour, but memory debugging is buggy because mpatrol and the M$ debug malloc implementation are incompatible (according to the mpatrol documentation/mailing list). I've posted the bug description here because I don't know where to start. Even "it is their fault" pointers would be helpful. Thanks in advance, Markus Appendix: real quick howto install mpatrol (to make it work for this example): - download from http://www.cbmamiga.demon.co.uk/mpatrol/files/mpatrol_1.4.8.tar.gz - unpack to c:\src - cmd prompt to C:\src\mpatrol\build\windows - "source" vsvars32.bat (YMMV): $ "c:\Programme\Microsoft Visual Studio .NET\Common7\Tools\vsvars32.bat" - $ nmake -f NMakefile all - copy mpatrolmt.lib to c:\local\lib - copy libmpatrolmt.lib to c:\local\lib - copy mpatrolmt.dll to a directory in $PATH (or local directory)
"KLINIK Markus SDI2-G (AREVA NP GmbH)" <Markus.Klinik@areva.com> wrote in message news:2ABE79BD730E7741ADF6C70557CEA87BA2510E@egeer00mx01.edom.ad.corp...
Hi,
there seems to be a problem if Boost.Test and mpatrol are used together. The following program hangs and constantly uses more and more memory.
How to reproduce the behaviour:
System: Windows XP Prof. SP2 MS Visual Studio 7 mpatrol-1.4.8 boost-1.33.1
<code> #define BOOST_AUTO_TEST_MAIN #include <boost/test/auto_unit_test.hpp>
BOOST_AUTO_TEST_CASE(testA) { int* a = new int[100]; } </code>
After "sourcing" vsvars32.bat the following command was used to compile & link the sample. cl -Zi -EHsc -ML -Ic:\boost\include\boost-1_33_1 test.cpp -link -libpath:c:\local\lib mpatrol.lib -libpath:c:\boost\lib libboost_unit_test_framework-vc7-s.lib
Static linkage of mpatrol results in the same behaviour: cl -Zi -EHsc -ML -Ic:\boost\include\boost-1_33_1 test.cpp -link -libpath:c:\local\lib libmpatrol.lib imagehlp.lib -libpath:c:\boost\lib libboost_unit_test_framework-vc7-s.lib
Same with -MT, mpatrolmt.lib and libboost_unit_test_framework-vc7-mt-s.lib
The combinations -MLd, mpatrol.lib and libboost_unit_test_framework-vc7-sgd.lib -MTd, mpatrolmt.lib and libboost_unit_test_framework-vc7-mt-sgd.lib do not result in the erroneous behaviour, but memory debugging is buggy because mpatrol and the M$ debug malloc implementation are incompatible (according to the mpatrol documentation/mailing list).
Hi, Markus I've got no idea what mpatrol is. Did you try to debug it? Try to use --catch_system_errors=no. I might not be able to look at this with more details before BoostCon. HTH, Gennadiy
participants (2)
-
Gennadiy Rozental
-
KLINIK Markus SDI2-G (AREVA NP GmbH)