Boost C++ Libraries: Ticket #5682: BOOST_TEST_REPORT_LEVEL and BOOST_TEST_LOG_LEVEL crash on Mac OS X with g++ 4.6.1 https://svn.boost.org/trac10/ticket/5682 <p> Using the environment setting <code>BOOST_TEST_REPORT_LEVEL=detailed</code> and <code>BOOST_TEST_LOG_LEVEL=all</code> frees an unallocated pointer on mac os x when running simple boost unit tests compiled with g++ 4.6.1; standard g++ 4.2.1 has not this problem: </p> <pre class="wiki">$ g++ -DBOOST_TEST_DYN_LINK -I/opt/local/include -L/opt/local/lib -lboost_unit_test_framework-mt boost_test.cxx $ ./a.out Running 1 test case... *** No errors detected $ BOOST_TEST_REPORT_LEVEL=detailed BOOST_TEST_LOG_LEVEL=all ./a.out Running 1 test case... Entering test suite "boost_test" Entering test case "mytest" boost_test.cxx:4: info: check true passed Leaving test case "mytest"; testing time: 40mks Leaving test suite "boost_test" Test suite "boost_test" passed with: 1 assertion out of 1 passed 1 test case out of 1 passed Test case "mytest" passed with: 1 assertion out of 1 passed </pre><p> Compiling with g++ 4.6.1 gives </p> <pre class="wiki">$ g++-mp-4.6 -DBOOST_TEST_DYN_LINK -I/opt/local/include -L/opt/local/lib -lboost_unit_test_framework-mt boost_test.cxx $ ./a.out Running 1 test case... *** No errors detected $ BOOST_TEST_REPORT_LEVEL=detailed BOOST_TEST_LOG_LEVEL=all ./a.out a.out(46920) malloc: *** error for object 0x7fff71199500: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap </pre><p> A backtrace does not give too much information: </p> <pre class="wiki">$ BOOST_TEST_REPORT_LEVEL=detailed BOOST_TEST_LOG_LEVEL=all gdb ./a.out [...] (gdb) break malloc_error_break Breakpoint 1 at 0x4189374bb83499 (gdb) run Starting program: /Users/tkren/a.out Reading symbols for shared libraries ++++.. done a.out(73567) malloc: *** error for object 0x7fff71199500: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Breakpoint 1, 0x00007fff870a5499 in malloc_error_break () (gdb) backtrace #0 0x00007fff870a5499 in malloc_error_break () #1 0x00007fff86fcf183 in free () #2 0x000000010019c261 in std::basic_stringbuf&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::overflow () </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5682 Trac 1.4.3 Thomas Krennwallner <tkren@…> Sun, 10 Jul 2011 12:14:47 GMT attachment set https://svn.boost.org/trac10/ticket/5682 https://svn.boost.org/trac10/ticket/5682 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_test.cxx</span> </li> </ul> <p> BOOST_TEST_REPORT_LEVEL bug on mac os x </p> Ticket Thomas Krennwallner <tkren@…> Sun, 10 Jul 2011 12:17:18 GMT summary changed https://svn.boost.org/trac10/ticket/5682#comment:1 https://svn.boost.org/trac10/ticket/5682#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">BOOST_TEST_REPORT_LEVEL and BOOST_TEST_LOG_LEVEL crash on Mac OS X with g++ 4.6.1.1</span> → <span class="trac-field-new">BOOST_TEST_REPORT_LEVEL and BOOST_TEST_LOG_LEVEL crash on Mac OS X with g++ 4.6.1</span> </li> </ul> Ticket Gennadiy Rozental Mon, 17 Oct 2011 05:40:12 GMT <link>https://svn.boost.org/trac10/ticket/5682#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5682#comment:2</guid> <description> <p> I do not have access to MacOS. Works fine with gcc 4.6.1 under Ubuntu. backtrace points to the system iostreams. I will not be able to move any further without more information, but I doubt frankly this is Boost.Test issue. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 09 Jun 2012 23:35:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5682#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5682#comment:3</guid> <description> <p> Having the same problem with 4.7 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gennadiy Rozental</dc:creator> <pubDate>Mon, 05 Nov 2012 02:06:23 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5682#comment:4 https://svn.boost.org/trac10/ticket/5682#comment:4 <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> I do not have an access to Macs and it works fine both in regression tests and on Linux with similar setup. I do not see any indication yet this is Boost.Test issue. Once you have patch or more concrete pointer to the error in a code please resubmit the issue </p> Ticket