Boost C++ Libraries: Ticket #4187: Unit Test framework does things that OS X dislikes 2 https://svn.boost.org/trac10/ticket/4187 <p> Using the attached file, compiled as follows with Boost 1.42, the simple unit test seg faults under Mac OSX 10.6.3. </p> <pre class="wiki">#define BOOST_TEST_MODULE footest test #include &lt;boost/test/unit_test.hpp&gt; 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 ); } </pre><p> $ 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:?&gt;??0H0H0?0?0test4?00auto_start_dbgbreak_exec_path </p> <p> build_infocatch_system_errorsdetect_fp_exceptionsdetect_memory_leaks </p> <p> report_format log_level </p> <blockquote> <p> report_level </p> </blockquote> <blockquote> <blockquote> <p> result_corun_test </p> </blockquote> </blockquote> <p> use_alt_stack?0`N? save_pattern </p> <blockquote> <p> 0??0&lt; 0--?;help?0PA? 0{0?;?@? </p> </blockquote> <p> 0 0? 0p: 00P?N??N? 0H 0? 00??M 0h 0M?--this help message0=0?98 </p> <blockquote> <p> 0` </p> <blockquote> <p> 0( </p> <blockquote> <p> 0p:? 0? </p> <blockquote> <p> 0??N? </p> <blockquote> <p> 0? </p> <blockquote> <p> 0? </p> <blockquote> <p> 00=00&lt;? 0use_alt_stack??P?? </p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <p> 0??&gt;&gt;Turns on/off usage of an alternative stack for signal handlingS?--BOOST_TESshow_progresspPA??0P </p> <blockquote> <p> 0Turns on progress display= ?9x0?0X0p:?0?0??N?0(0?0=?;0&lt;?0 </p> </blockquote> <blockquote> <blockquote> <p> 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&lt;?0----?; </p> </blockquote> </blockquote> <blockquote> <p> result_codecPA?077Allows to disable test modules's result code generation= BOOST_TEST_OUTPUT_FORMAT?0?0X0?<code>00P?N??NX0?0(0??M80?0H0?</code>0---- </p> </blockquote> <blockquote> <blockquote> <p> 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. </p> </blockquote> </blockquote> <p> 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&amp;("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 <a class="missing ticket">#0</a>?"0P-?<a class="missing ticket">#0</a>?<a class="missing ticket">#0</a>P?N??N?<a class="missing ticket">#0</a>$0?$0??M?<a class="missing ticket">#0</a>H$0?$0?/?<a class="missing ticket">#0</a>----/ </p> <p> log_formatf?2?"0Specifies log format= P38&amp;0P%0%0P4?%0?%0??N?&amp;0?%0?%0=p56?%0detect_memory_leaks09?$0;;Allows to switch between catching and ignoring memory leaks--?9?'0'0?&amp;0p:<code>'0p'0??Nh(0?'0X'0=?;0&lt;</code>'0detect_fp_exceptionsP??&amp;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&lt;?)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&lt;?,0----?; </p> <p> 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&lt;?00----?;auto_start_dbgdPA?/0CCAutomatically starts debugger if system level error (signal) occurs= 20?V?/0010020?10?-0?.0P2020@+0?,0p20020?(0P*0?20P20?&amp;0?'0?20p20?$0&amp;0?20?20?"0P$0?20?20P 0?!030?20?0p0030?20?0?0P3030?000p30030 0?0?30P30?000?30p300?0?30?30 0@0?30?30? </p> <blockquote> <p> 0?040?30? </p> </blockquote> <p> 0 </p> <blockquote> <p> 0?V?30? 0p 0?40? </p> <blockquote> <p> 0? </p> <blockquote> <p> 00? </p> <blockquote> <p> 0? </p> <blockquote> <p> 0N90?708 0M 008 0M 0M?70?60040?000?00M90?:0h?????boost_test.cc?40?(0?(00?(0?(0M@S070<code>L70?LBOOST_TEST_SHOW_PROGRESS?40?40</code>80x70?700x70?70M?80p/0880BOOST_TEST_DETECT_MEMORY_LEAK?70?&lt;00&lt;0880U800880U80Mp9080?80BOOST_TESTS_TO_RUN?40?90P50?80 </p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <p> 900?80 90M<code>:0?80?90BOOST_TEST_RANDOM90?90?900?90?90M@:0</code>:&lt;00=0 :0?&lt;0 :0p90?:0BOOST_TEST_BUILD_INFOP50?:0?:00?:0?:0M?;0?_??S;0?&gt;0?_?BOOST_TEST_CATCH_SYSTEM_ERRORS<code>80P&lt;0&amp;&lt;0&lt;0&amp;&lt;0MBOOST_TEST_AUTO_START_DBG</code>80?=0?&lt;0?&lt;00?&lt;0?&lt;0M?=0@:0h=0BOOST_TEST_USE_ALT_STACK?&lt;0h=0?=00h=0?=0M`N0=0(&gt;0BOOST_TEST_DETECT_FP_EXCEPTIONS0&lt;0(&gt;0G&gt;00(&gt;0G&gt;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 </p> <blockquote> <p> ?? </p> <blockquote> <p> ?????TSQTSQ?????j*??j*????????? </p> </blockquote> </blockquote> <p> ? unknown location:0: fatal error in "test3`0?0?00P??0random:?&gt;??0H0H0?0?0test4?00auto_start_dbgbreak_exec_path </p> <p> build_infocatch_system_errorsdetect_fp_exceptionsdetect_memory_leaks </p> <p> report_format log_level </p> <blockquote> <p> report_level </p> </blockquote> <blockquote> <blockquote> <p> result_corun_test </p> </blockquote> </blockquote> <p> use_alt_stack?0`N? save_pattern </p> <blockquote> <p> 0??0&lt; 0--?;help?0PA? 0{0?;?@? </p> </blockquote> <p> 0 0? 0p: 00P?N??N? 0H 0? 00??M 0h 0M?--this help message0=0?98 </p> <blockquote> <p> 0` </p> <blockquote> <p> 0( </p> <blockquote> <p> 0p:? 0? </p> <blockquote> <p> 0??N? </p> <blockquote> <p> 0? </p> <blockquote> <p> 0? </p> <blockquote> <p> 00=00&lt;? 0use_alt_stack??P?? </p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <p> 0??&gt;&gt;Turns on/off usage of an alternative stack for signal handlingS?--BOOST_TESshow_progresspPA??0P </p> <blockquote> <p> 0Turns on progress display= ?9x0?0X0p:?0?0??N?0(0?0=?;0&lt;?0 </p> </blockquote> <blockquote> <blockquote> <p> 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&lt;?0----?; </p> </blockquote> </blockquote> <blockquote> <p> result_codecPA?077Allows to disable test modules's result code generation= BOOST_TEST_OUTPUT_FORMAT?0?0X0?<code>00P?N??NX0?0(0??M80?0H0?</code>0---- </p> </blockquote> <blockquote> <blockquote> <p> 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. </p> </blockquote> </blockquote> <p> 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&amp;("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 <a class="missing ticket">#0</a>?"0P-?<a class="missing ticket">#0</a>?<a class="missing ticket">#0</a>P?N??N?<a class="missing ticket">#0</a>$0?$0??M?<a class="missing ticket">#0</a>H$0?$0?/?<a class="missing ticket">#0</a>----/ </p> <p> log_formatf?2?"0Specifies log format= P38&amp;0P%0%0P4?%0?%0??N?&amp;0?%0?%0=p56?%0detect_memory_leaks09?$0;;Allows to switch between catching and ignoring memory leaks--?9?'0'0?&amp;0p:<code>'0p'0??Nh(0?'0X'0=?;0&lt;</code>'0detect_fp_exceptionsP??&amp;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&lt;?)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&lt;?,0----?; </p> <p> 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&lt;?00----?;auto_start_dbgdPA?/0CCAutomatically starts debugger if system level error (signal) occurs= 20?V?/0010020?10?-0?.0P2020@+0?,0p20020?(0P*0?20P20?&amp;0?'0?20p20?$0&amp;0?20?20?"0P$0?20?20P 0?!030?20?0p0030?20?0?0P3030?000p30030 0?0?30P30?000?30p300?0?30?30 0@0?30?30? </p> <blockquote> <p> 0?040?30? </p> </blockquote> <p> 0 </p> <blockquote> <p> 0?V?30? 0p 0?40? </p> <blockquote> <p> 0? </p> <blockquote> <p> 00? </p> <blockquote> <p> 0? </p> <blockquote> <p> 0N90?708 0M 008 0M 0M?70?60040?000?00M90?:0h?????boost_test.cc?40?(0?(00?(0?(0M@S070<code>L70?LBOOST_TEST_SHOW_PROGRESS?40?40</code>80x70?700x70?70M?80p/0880BOOST_TEST_DETECT_MEMORY_LEAK?70?&lt;00&lt;0880U800880U80Mp9080?80BOOST_TESTS_TO_RUN?40?90P50?80 </p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <p> 900?80 90M<code>:0?80?90BOOST_TEST_RANDOM90?90?900?90?90M@:0</code>:&lt;00=0 :0?&lt;0 :0p90?:0BOOST_TEST_BUILD_INFOP50?:0?:00?:0?:0M?;0?_??S;0?&gt;0?_?BOOST_TEST_CATCH_SYSTEM_ERRORS<code>80P&lt;0&amp;&lt;0&lt;0&amp;&lt;0MBOOST_TEST_AUTO_START_DBG</code>80?=0?&lt;0?&lt;00?&lt;0?&lt;0M?=0@:0h=0BOOST_TEST_USE_ALT_STACK?&lt;0h=0?=00h=0?=0M<code>N0=0(&gt;0BOOST_TEST_DETECT_FP_EXCEPTIONS0&lt;0(&gt;0G&gt;00(&gt;0G&gt;0M0?;0@?0?_??&gt;0?_?????unknown locatio(??jd(??=&gt;?&lt;??P@0++CCUNG?K(??@ٿ_???)H?@?K(??jd(???vhv3?@0++CCUNG?K(??</code>ٿ_??`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 </p> <blockquote> <p> ?? </p> <blockquote> <p> ?????TSQTSQ?????j*??j*????????? </p> </blockquote> </blockquote> <p> ? Segmentation fault </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4187 Trac 1.4.3 tegtmeye@… Tue, 04 May 2010 18:34:24 GMT summary changed https://svn.boost.org/trac10/ticket/4187#comment:1 https://svn.boost.org/trac10/ticket/4187#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">Unit Test framework does things that OS X's malloc dislikes 2</span> → <span class="trac-field-new">Unit Test framework does things that OS X dislikes 2</span> </li> </ul> Ticket tegtmeye@… Tue, 04 May 2010 23:36:48 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4187#comment:2 https://svn.boost.org/trac10/ticket/4187#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> Disregard. When trying to debug, boost.m4 was pulling previous unit_test_library. Sorry for the distraction. </p> Ticket