Subject: [Boost-bugs] [Boost C++ Libraries] #3797: valgrind indicates invalid read at framework.ipp:133
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-12-26 01:50:58
#3797: valgrind indicates invalid read at framework.ipp:133
-------------------------------+--------------------------------------------
Reporter: smaximov@⦠| Owner: rogeeff
Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: test
Version: Boost 1.41.0 | Severity: Problem
Keywords: |
-------------------------------+--------------------------------------------
When compiled with gcc 4.3, valgrind-3.3.1 indicates invalid read as shown
below. Attached patch addresses the problem.
==5798== Invalid read of size 4
==5798== at 0x80F7ED6: boost::unit_test::framework_impl::clear()
(framework.ipp:133)
==5798== by 0x80F800B:
boost::unit_test::framework_impl::~framework_impl() (framework.ipp:122)
==5798== by 0x432BAB8: exit (in /lib/i686/cmov/libc-2.7.so)
==5798== by 0x431345C: (below main) (in /lib/i686/cmov/libc-2.7.so)
==5798== Address 0x4593c84 is 20 bytes inside a block of size 24 free'd
==5798== at 0x402272A: operator delete(void*) (vg_replace_malloc.c:342)
==5798== by 0x80D0FD4:
__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) (new_allocator.h:98)
==5798== by 0x80D0FF9: 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)
==5798== by 0x80D1049: 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)
==5798== by 0x80F7899: 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)
==5798== by 0x80F7AFB: 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)
==5798== by 0x80F7B5C: 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)
==5798== by 0x80F7B89: 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)
==5798== by 0x80AF6A8:
boost::unit_test::framework::deregister_test_unit(boost::unit_test::test_unit*)
(framework.ipp:326)
==5798== by 0x80AF756: boost::unit_test::test_unit::~test_unit()
(unit_test_suite.ipp:65)
==5798== by 0x80F7DE4: boost::unit_test::test_case::~test_case()
(unit_test_suite_impl.hpp:115)
==5798== by 0x80F7ED2: boost::unit_test::framework_impl::clear()
(framework.ipp:133)
==5798==
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3797> 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:02 UTC