Subject: [Boost-bugs] [Boost C++ Libraries] #4187: Unit Test framework does things that OS X's malloc dislikes 2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-04 18:32:56
#4187: Unit Test framework does things that OS X's malloc dislikes 2
--------------------------------+-------------------------------------------
Reporter: tegtmeye@⦠| Owner: rogeeff
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: test
Version: Boost 1.42.0 | Severity: Showstopper
Keywords: Mac OS X 10.6 |
--------------------------------+-------------------------------------------
Using the attached file, compiled as follows with Boost 1.42, the simple
unit test seg faults under Mac OSX 10.6.3.
{{{
#define BOOST_TEST_MODULE footest test
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE( test1 ) {
BOOST_CHECK( true );
}
BOOST_AUTO_TEST_CASE( test2 ) {
BOOST_CHECK( true );
}
BOOST_AUTO_TEST_CASE( test3 ) {
BOOST_CHECK( false );
}
BOOST_AUTO_TEST_CASE( test4 ) {
BOOST_CHECK( true );
}
}}}
$ g++ --version
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)
$ g++ boost_test.cc /opt/local/lib/libboost_unit_test_framework-mt.a
$ file a.out
a.out: Mach-O 64-bit executable x86_64
$ ./a.out
Running 4 test cases...
boost_test.cc:18: error in
"test3`0?0?00P??0random:?>??0H0H0?0?0test4?00auto_start_dbgbreak_exec_path
build_infocatch_system_errorsdetect_fp_exceptionsdetect_memory_leaks
report_format log_level
report_level
result_corun_test
use_alt_stack?0`N? save_pattern
0??0< 0--?;help?0PA? 0{0?;?@?
0
0? 0p: 00P?N??N?
0H 0?
00??M 0h 0M?--this help message0=0?98
0`
0(
0p:? 0?
0??N?
0?
0?
00=00<?
0use_alt_stack??P??
0??>>Turns on/off usage of an alternative stack for signal handlingS?--
BOOST_TESshow_progresspPA??0P
0Turns on progress display=
?9x0?0X0p:?0?0??N?0(0?0=?;0<?0
save_patternP? 0FFAllows to switch between saving and matching against
test pattern file--a.outtp?0?0H0?P0?0P?N??NH0x080??M(0?0X0?P0---
run_testt?0((Allows to filter which test units to run=
p0result_c?0?@h00?0p:?0p0P?N??N?0?0?0??M?0(0?00<?0----?;
result_codecPA?077Allows to disable test modules's result code
generation= BOOST_TEST_OUTPUT_FORMAT?0?0X0?`00P?N??NX0?0(0??M80?0H0?`0----
report_levelr?
0Specifies report level=
BOOST_TEST_LOG_LEVEL?p0p,h00?0P-?0p0P?N??N?0?0?0??M?0(0?0?/?0-report_formatm?2?0Specifies
report format= ?"008 0random|a?"0?00 ?0`(!00?P?N??N(0X0h0??0x0?0?"00----
0"randoma?%?0??Allows to switch between sequential and random order of
test units execution.
Optionally allows to specify concrete seed for random number
generator=[Dp?p/0+0output_formato?2?0--Specifies output format (both log
and report)= BOOST_TEST_LOG_FORMATP&("0? 0?
00'?!00!0P?N??N?!0?!0X"0??Mh!0?!0x"0?(?!0----P( log_levell,P
0Specifies log level= +0?0?0log_form?0p,?$0
#0?"0P-?#0?#0P?N??N?#0$0?$0??M?#0H$0?$0?/?#0----/
log_formatf?2?"0Specifies log format=
P38&0P%0%0P4?%0?%0??N?&0?%0?%0=p56?%0detect_memory_leaks09?$0;;Allows to
switch between catching and ignoring memory
leaks--?9?'0'0?&0p:`'0p'0??Nh(0?'0X'0=?;0<`'0detect_fp_exceptionsP??&0HHAllows
to switch between catching and ignoring floating point exceptions--
BOOST_TEST_REPORT_LEVELp??"0?@?*0
)0?(0p:?)0?)0P?N??N?)0*0?*0??M?)0H*+00<?)0----?;catch_system_errorssPA?(0FFAllows
to switch between catching and ignoring system errors (signals)=
?0?"0h0build_in???"0?@-0?+0x+0p:?,0
,0P?N??Nx,0?,0X-0??MX,0?,0x-00<?,0----?;
build_infoiPA@+0Shows library build information=
???.0?-0?-0?@.0P.0??NH/0?.08.0=??@.0break_exec_pathP@?-0KKFor the
exception safety testing allows to break at specific execution path--(\Dp?
80?0x70?@h1000?/0p:?00p00P?N??N?00?00?10??M?00(10?100<?00----?;auto_start_dbgdPA?/0CCAutomatically
starts debugger if system level error (signal) occurs=
20?V?/0010020?10?-0?.0P2020@+0?,0p20020?(0P*0?20P20?&0?'0?20p20?$0&0?20?20?"0P$0?20?20P
0?!030?20?0p0030?20?0?0P3030?000p30030 0?0?30P30?000?30p300?0?30?30
0_at_0?30?30?
0?040?30?
0
0?V?30? 0p 0?40?
0?
00?
0?
0N90?708 0M 008 0M
0M?70?60040?000?00M90?:0h?????boost_test.cc?40?(0?(00?(0?(0M_at_S070`L70?LBOOST_TEST_SHOW_PROGRESS?40?40`80x70?700x70?70M?80p/0880BOOST_TEST_DETECT_MEMORY_LEAK?70?<00<0880U800880U80Mp9080?80BOOST_TESTS_TO_RUN?40?90P50?80
900?80
90M`:0?80?90BOOST_TEST_RANDOM90?90?900?90?90M@:0`:<00=0 :0?<0
:0p90?:0BOOST_TEST_BUILD_INFOP50?:0?:00?:0?:0M?;0?_??S;0?>0?_?BOOST_TEST_CATCH_SYSTEM_ERRORS`80P<0&<0<0&<0MBOOST_TEST_AUTO_START_DBG`80?=0?<0?<00?<0?<0M?=0@:0h=0BOOST_TEST_USE_ALT_STACK?<0h=0?=00h=0?=0M`N0=0(>0BOOST_TEST_DETECT_FP_EXCEPTIONS0<0(>0G>00(>0G>0M????boost_test.cc??+P+P
?e
?e?R???R??$I?$$I?$IR?IR??*?*EPEPME?ME?RP?RP?j*Tj*T?j*?Rj*T?T???T-?T-?R?R??Z?*Z?*??B??B%??%??R
??
?????TSQTSQ?????j*??j*?????????
?
unknown location:0: fatal error in
"test3`0?0?00P??0random:?>??0H0H0?0?0test4?00auto_start_dbgbreak_exec_path
build_infocatch_system_errorsdetect_fp_exceptionsdetect_memory_leaks
report_format log_level
report_level
result_corun_test
use_alt_stack?0`N? save_pattern
0??0< 0--?;help?0PA? 0{0?;?@?
0
0? 0p: 00P?N??N?
0H 0?
00??M 0h 0M?--this help message0=0?98
0`
0(
0p:? 0?
0??N?
0?
0?
00=00<?
0use_alt_stack??P??
0??>>Turns on/off usage of an alternative stack for signal handlingS?--
BOOST_TESshow_progresspPA??0P
0Turns on progress display=
?9x0?0X0p:?0?0??N?0(0?0=?;0<?0
save_patternP? 0FFAllows to switch between saving and matching against
test pattern file--a.outtp?0?0H0?P0?0P?N??NH0x080??M(0?0X0?P0---
run_testt?0((Allows to filter which test units to run=
p0result_c?0?@h00?0p:?0p0P?N??N?0?0?0??M?0(0?00<?0----?;
result_codecPA?077Allows to disable test modules's result code
generation= BOOST_TEST_OUTPUT_FORMAT?0?0X0?`00P?N??NX0?0(0??M80?0H0?`0----
report_levelr?
0Specifies report level=
BOOST_TEST_LOG_LEVEL?0p,h00?0P-?0p0P?N??N?0?0?0??M?0(0?0?/?0--
report_formatm?2?0Specifies report format= ?"008 0random|a?0?00
?0`(!00?P?N??N(0X0h0??0x0?0?"00----0"randoma?%?0??Allows to switch between
sequential and random order of test units execution.
Optionally allows to specify concrete seed for random number
generator=[Dp?p/0+0output_formato?2?0--Specifies output format (both log
and report)= BOOST_TEST_LOG_FORMATP&("0? 0?
00'?!00!0P?N??N?!0?!0X"0??Mh!0?!0x"0?(?!0----P( log_levell,P
0Specifies log level= +0?0?0log_form`@0p,?$0
#0?"0P-?#0?#0P?N??N?#0$0?$0??M?#0H$0?$0?/?#0----/
log_formatf?2?"0Specifies log format=
P38&0P%0%0P4?%0?%0??N?&0?%0?%0=p56?%0detect_memory_leaks09?$0;;Allows to
switch between catching and ignoring memory
leaks--?9?'0'0?&0p:`'0p'0??Nh(0?'0X'0=?;0<`'0detect_fp_exceptionsP??&0HHAllows
to switch between catching and ignoring floating point exceptions--
BOOST_TEST_REPORT_LEVELp??"0?@?*0
)0?(0p:?)0?)0P?N??N?)0*0?*0??M?)0H*+00<?)0----?;catch_system_errorssPA?(0FFAllows
to switch between catching and ignoring system errors (signals)=
?0?"0h0build_in???"0?@-0?+0x+0p:?,0
,0P?N??Nx,0?,0X-0??MX,0?,0x-00<?,0----?;
build_infoiPA@+0Shows library build information=
???.0?-0?-0?@.0P.0??NH/0?.08.0=??@.0break_exec_pathP@?-0KKFor the
exception safety testing allows to break at specific execution path--(\Dp?
80?0x70?@h1000?/0p:?00p00P?N??N?00?00?10??M?00(10?100<?00----?;auto_start_dbgdPA?/0CCAutomatically
starts debugger if system level error (signal) occurs=
20?V?/0010020?10?-0?.0P2020@+0?,0p20020?(0P*0?20P20?&0?'0?20p20?$0&0?20?20?"0P$0?20?20P
0?!030?20?0p0030?20?0?0P3030?000p30030 0?0?30P30?000?30p300?0?30?30
0_at_0?30?30?
0?040?30?
0
0?V?30? 0p 0?40?
0?
00?
0?
0N90?708 0M 008 0M
0M?70?60040?000?00M90?:0h?????boost_test.cc?40?(0?(00?(0?(0M_at_S070`L70?LBOOST_TEST_SHOW_PROGRESS?40?40`80x70?700x70?70M?80p/0880BOOST_TEST_DETECT_MEMORY_LEAK?70?<00<0880U800880U80Mp9080?80BOOST_TESTS_TO_RUN?40?90P50?80
900?80
90M`:0?80?90BOOST_TEST_RANDOM90?90?900?90?90M@:0`:<00=0 :0?<0
:0p90?:0BOOST_TEST_BUILD_INFOP50?:0?:00?:0?:0M?;0?_??S;0?>0?_?BOOST_TEST_CATCH_SYSTEM_ERRORS`80P<0&<0<0&<0MBOOST_TEST_AUTO_START_DBG`80?=0?<0?<00?<0?<0M?=0@:0h=0BOOST_TEST_USE_ALT_STACK?<0h=0?=00h=0?=0M`N0=0(>0BOOST_TEST_DETECT_FP_EXCEPTIONS0<0(>0G>00(>0G>0M0?;0@?0?_??>0?_?????unknown
locatio(??jd(??=>?<??P_at_0++CCUNG?K(??@Ù¿_???)H?@?K(??jd(???vhv3?@0++CCUNG?K(??`Ù¿_??`P?P
@+P+P ?e
?e?R???R??$I?$$I?$IR?IR??*?*EPEPME?ME??T-?T-?R?R?T?j*T?j*T?T?T*?j*?j*??*??Z?*Z?*??B??B%??%??R
??
?????TSQTSQ?????j*??j*?????????
?
Segmentation fault
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4187> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC