[Bug 383965] [NEW] Boost unit test frameworks sporadically crashes
Peter Soetens
peter at thesourceworks.com
Fri Jun 5 15:04:36 UTC 2009
Public bug reported:
There is an issue with the Boost UTF which makes my unit tests crash upon program exit. It seems to be a double free(). I'm not linking against the boost utf libraries, I'm using the 'static' configuration, so headers only.
Note that the crash occurs after main() exits.
$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
$ dpkg -l "*boost*" |grep ii
ii libboost-date-time1.37-dev 1.37.0-3ubuntu3 set of date-time libraries based on generic
ii libboost-date-time1.37.0 1.37.0-3ubuntu3 set of date-time libraries based on generic
ii libboost-filesystem1.37-dev 1.37.0-3ubuntu3 filesystem operations (portable paths, itera
ii libboost-filesystem1.37.0 1.37.0-3ubuntu3 filesystem operations (portable paths, itera
ii libboost-graph1.37-dev 1.37.0-3ubuntu3 generic graph components and algorithms in C
ii libboost-graph1.37.0 1.37.0-3ubuntu3 generic graph components and algorithms in C
ii libboost-iostreams1.37-dev 1.37.0-3ubuntu3 Boost.Iostreams Library development files
ii libboost-iostreams1.37.0 1.37.0-3ubuntu3 Boost.Iostreams Library
ii libboost-math1.37-dev 1.37.0-3ubuntu3 Boost.Math Library development files
ii libboost-math1.37.0 1.37.0-3ubuntu3 Boost.Math Library
ii libboost-program-options1.35.0 1.35.0-8ubuntu5 program options library for C++
ii libboost-program-options1.37-dev 1.37.0-3ubuntu3 program options library for C++
ii libboost-program-options1.37.0 1.37.0-3ubuntu3 program options library for C++
ii libboost-python1.35.0 1.35.0-8ubuntu5 Boost.Python Library
ii libboost-python1.37-dev 1.37.0-3ubuntu3 Boost.Python Library development files
ii libboost-python1.37.0 1.37.0-3ubuntu3 Boost.Python Library
ii libboost-regex1.37-dev 1.37.0-3ubuntu3 regular expression library for C++
ii libboost-regex1.37.0 1.37.0-3ubuntu3 regular expression library for C++
ii libboost-serialization1.37-dev 1.37.0-3ubuntu3 serialization library for C++
ii libboost-serialization1.37.0 1.37.0-3ubuntu3 serialization library for C++
ii libboost-signals1.37-dev 1.37.0-3ubuntu3 managed signals and slots library for C++
ii libboost-signals1.37.0 1.37.0-3ubuntu3 managed signals and slots library for C++
ii libboost-system1.37-dev 1.37.0-3ubuntu3 Operating system (e.g. diagnostics support)
ii libboost-system1.37.0 1.37.0-3ubuntu3 Operating system (e.g. diagnostics support)
ii libboost-test1.37-dev 1.37.0-3ubuntu3 components for writing and executing test su
ii libboost-test1.37.0 1.37.0-3ubuntu3 components for writing and executing test su
ii libboost-thread1.37-dev 1.37.0-3ubuntu3 portable C++ multi-threading
ii libboost-thread1.37.0 1.37.0-3ubuntu3 portable C++ multi-threading
ii libboost-wave1.37-dev 1.37.0-3ubuntu3 C99/C++ preprocessor library
ii libboost-wave1.37.0 1.37.0-3ubuntu3 C99/C++ preprocessor library
ii libboost1.37-dbg 1.37.0-3ubuntu3 Boost C++ Libraries with debug symbols
ii libboost1.37-dev 1.37.0-3ubuntu3 Boost C++ Libraries development files
ii libboost1.37-doc 1.37.0-3ubuntu3 Boost.org libraries documentation
Valgrind output:
$ valgrind ./tests/program-test
==3438== Memcheck, a memory error detector.
==3438== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==3438== Using LibVEX rev 1884, a library for dynamic binary translation.
==3438== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==3438== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework.
==3438== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==3438== For more details, rerun with: -v
==3438==
Running 19 test cases...
*** No errors detected
==3438== Invalid read of size 8
==3438== at 0x4D70A7: boost::unit_test::framework_impl::clear() (framework.ipp:133)
==3438== by 0x4D7200: boost::unit_test::framework_impl::~framework_impl() (framework.ipp:122)
==3438== by 0x5F6C6EC: exit (in /lib/libc-2.9.so)
==3438== by 0x5F545AC: (below main) (in /lib/libc-2.9.so)
==3438== Address 0x83c4f20 is 40 bytes inside a block of size 48 free'd
==3438== at 0x4C260AD: operator delete(void*) (vg_replace_malloc.c:342)
==3438== by 0x4C8AAE: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<unsigned long const, boost::unit_test::test_unit*> > >::deallocate(std::_Rb_tree_node<std::pair<unsigned long const, boost::unit_test::test_unit*> >*, unsigned long) (new_allocator.h:98)
==3438== by 0x4C8AD6: std::_Rb_tree<unsigned long, std::pair<unsigned long const, boost::unit_test::test_unit*>, std::_Select1st<std::pair<unsigned long const, boost::unit_test::test_unit*> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, boost::unit_test::test_unit*> > >::_M_put_node(std::_Rb_tree_node<std::pair<unsigned long const, boost::unit_test::test_unit*> >*) (stl_tree.h:361)
==3438== by 0x4C8B21: std::_Rb_tree<unsigned long, std::pair<unsigned long const, boost::unit_test::test_unit*>, std::_Select1st<std::pair<unsigned long const, boost::unit_test::test_unit*> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, boost::unit_test::test_unit*> > >::_M_destroy_node(std::_Rb_tree_node<std::pair<unsigned long const, boost::unit_test::test_unit*> >*) (stl_tree.h:391)
==3438== by 0x4D6A55: std::_Rb_tree<unsigned long, std::pair<unsigned long const, boost::unit_test::test_unit*>, std::_Select1st<std::pair<unsigned long const, boost::unit_test::test_unit*> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, boost::unit_test::test_unit*> > >::erase(std::_Rb_tree_iterator<std::pair<unsigned long const, boost::unit_test::test_unit*> >) (stl_tree.h:1319)
==3438== by 0x4D6C8C: std::_Rb_tree<unsigned long, std::pair<unsigned long const, boost::unit_test::test_unit*>, std::_Select1st<std::pair<unsigned long const, boost::unit_test::test_unit*> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, boost::unit_test::test_unit*> > >::erase(std::_Rb_tree_iterator<std::pair<unsigned long const, boost::unit_test::test_unit*> >, std::_Rb_tree_iterator<std::pair<unsigned long const, boost::unit_test::test_unit*> >) (stl_tree.h:1359)
==3438== by 0x4D6CF2: std::_Rb_tree<unsigned long, std::pair<unsigned long const, boost::unit_test::test_unit*>, std::_Select1st<std::pair<unsigned long const, boost::unit_test::test_unit*> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, boost::unit_test::test_unit*> > >::erase(unsigned long const&) (stl_tree.h:1345)
==3438== by 0x4D6D24: std::map<unsigned long, boost::unit_test::test_unit*, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, boost::unit_test::test_unit*> > >::erase(unsigned long const&) (stl_map.h:538)
==3438== by 0x4B3349: boost::unit_test::framework::deregister_test_unit(boost::unit_test::test_unit*) (framework.ipp:326)
==3438== by 0x4B3411: boost::unit_test::test_unit::~test_unit() (unit_test_suite.ipp:65)
==3438== by 0x4D6F93: boost::unit_test::test_case::~test_case() (unit_test_suite_impl.hpp:110)
==3438== by 0x4D70A2: boost::unit_test::framework_impl::clear() (framework.ipp:133)
==3438==
==3438== ERROR SUMMARY: 19 errors from 1 contexts (suppressed: 10 from 1)
==3438== malloc/free: in use at exit: 2,276 bytes in 89 blocks.
==3438== malloc/free: 192,486 allocs, 192,397 frees, 6,445,697 bytes allocated.
==3438== For counts of detected errors, rerun with: -v
==3438== searching for pointers to 89 not-freed blocks.
==3438== checked 482,992 bytes.
==3438==
==3438== LEAK SUMMARY:
==3438== definitely lost: 2,276 bytes in 89 blocks.
==3438== possibly lost: 0 bytes in 0 blocks.
==3438== still reachable: 0 bytes in 0 blocks.
==3438== suppressed: 0 bytes in 0 blocks.
==3438== Rerun with --leak-check=full to see details of leaked memory.
** Affects: boost1.37 (Ubuntu)
Importance: Undecided
Status: Invalid
--
Boost unit test frameworks sporadically crashes
https://bugs.launchpad.net/bugs/383965
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list