Subject: [Boost-bugs] [Boost C++ Libraries] #13186: Memory leak in serialization 1.65
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-09-01 10:25:46
#13186: Memory leak in serialization 1.65
--------------------------+---------------------------
Reporter: anonymous | Owner: Robert Ramey
Type: Bugs | Status: new
Milestone: Boost 1.65.0 | Component: serialization
Version: Boost 1.65.0 | Severity: Showstopper
Keywords: |
--------------------------+---------------------------
Hi, we are seeing a seg fault seemingly caused by a difference between
boost serialization 1.64 and 1.65 (no problems in 1.64 or any other boost
we are currently testing >1.48 as part of Chaste computational physiology
library). Unfortunately the minimal failing test is a bit complicated I'm
afraid, this only seems to show up with a hierarchy of serialization
classes.
I've attached valgrind memory testing output which should hopefully give
all the clues needed to track it down:
{{{
==20488== Memcheck, a memory error detector
==20488== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==20488== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright
info
==20488== Command:
mesh/build/debug_hostconfig,boost=1-65/TestNodesOnlyMeshRunner
-malloc_debug -malloc_dump -memory_info
==20488== Parent PID: 20487
==20488==
==20488== Invalid read of size 8
==20488== at 0x7E55025:
boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister()
(in /home/robert/boost_1_65/lib/libboost_serialization.so.1.65.0)
==20488== by 0x4756E6:
boost::serialization::extended_type_info_typeid<AbstractTetrahedralMesh<3u,
3u> >::~extended_type_info_typeid() (extended_type_info_typeid.hpp:96)
==20488== by 0x474F02:
boost::serialization::singleton<boost::serialization::extended_type_info_typeid<AbstractTetrahedralMesh<3u,
3u> > >::get_instance()::singleton_wrapper::~singleton_wrapper() (in
/home/garmir/workspace/Chaste/mesh/build/debug_hostconfig,boost=1-65/TestNodesOnlyMeshRunner)
==20488== by 0x9E2E1A8: __run_exit_handlers (exit.c:82)
==20488== by 0x9E2E1F4: exit (exit.c:104)
==20488== by 0x9E13F4B: (below main) (libc-start.c:321)
==20488== Address 0x17bd1740 is 32 bytes inside a block of size 40 free'd
==20488== at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==20488== by 0x7E55572:
boost::serialization::singleton<std::multiset<boost::serialization::typeid_system::extended_type_info_typeid_0
const*, boost::serialization::typeid_system::type_compare,
std::allocator<boost::serialization::typeid_system::extended_type_info_typeid_0
const*> > >::get_instance()::singleton_wrapper::~singleton_wrapper() (in
/home/robert/boost_1_65/lib/libboost_serialization.so.1.65.0)
==20488== by 0x9E2E539: __cxa_finalize (cxa_finalize.c:56)
==20488== by 0x7E4D402: ??? (in
/home/robert/boost_1_65/lib/libboost_serialization.so.1.65.0)
==20488== by 0x40108D9: _dl_fini (dl-fini.c:252)
==20488== by 0x9E2E1A8: __run_exit_handlers (exit.c:82)
==20488== by 0x9E2E1F4: exit (exit.c:104)
==20488== by 0x9E13F4B: (below main) (libc-start.c:321)
==20488==
==20488== Invalid read of size 8
==20488== at 0x7E55036:
boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister()
(in /home/robert/boost_1_65/lib/libboost_serialization.so.1.65.0)
==20488== by 0x4756E6:
boost::serialization::extended_type_info_typeid<AbstractTetrahedralMesh<3u,
3u> >::~extended_type_info_typeid() (extended_type_info_typeid.hpp:96)
==20488== by 0x474F02:
boost::serialization::singleton<boost::serialization::extended_type_info_typeid<AbstractTetrahedralMesh<3u,
3u> > >::get_instance()::singleton_wrapper::~singleton_wrapper() (in
/home/garmir/workspace/Chaste/mesh/build/debug_hostconfig,boost=1-65/TestNodesOnlyMeshRunner)
==20488== by 0x9E2E1A8: __run_exit_handlers (exit.c:82)
==20488== by 0x9E2E1F4: exit (exit.c:104)
==20488== by 0x9E13F4B: (below main) (libc-start.c:321)
==20488== Address 0x17bd1738 is 24 bytes inside a block of size 40 free'd
==20488== at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==20488== by 0x7E55572:
boost::serialization::singleton<std::multiset<boost::serialization::typeid_system::extended_type_info_typeid_0
const*, boost::serialization::typeid_system::type_compare,
std::allocator<boost::serialization::typeid_system::extended_type_info_typeid_0
const*> > >::get_instance()::singleton_wrapper::~singleton_wrapper() (in
/home/robert/boost_1_65/lib/libboost_serialization.so.1.65.0)
==20488== by 0x9E2E539: __cxa_finalize (cxa_finalize.c:56)
==20488== by 0x7E4D402: ??? (in
/home/robert/boost_1_65/lib/libboost_serialization.so.1.65.0)
==20488== by 0x40108D9: _dl_fini (dl-fini.c:252)
==20488== by 0x9E2E1A8: __run_exit_handlers (exit.c:82)
==20488== by 0x9E2E1F4: exit (exit.c:104)
==20488== by 0x9E13F4B: (below main) (libc-start.c:321)
}}}
Incidentally, the consequences are exactly the same as a problem that
existed in boost 1.46 and was fixed in 1.48. I don't know if the
underlying problem is related.
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13186> 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-09-01 10:31:59 UTC