Tim St. Clair writes:
I'm running some serialization unit-tests which pass with flying colors under 1.35.0 and earlier, however they seg-fault on exit when run through 1.36.0. ... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb73e26c0 (LWP 4715)] 0xb76bb56b in std::_Rb_tree_rebalance_for_erase () from /usr/lib/libstdc++.so.6
I am having similar problems, only there are no shared pointers
involved. I was getting this segv also, but as I pared the example
down and it mutated into a memory corruption problem:
*** glibc detected *** ./serio: double free or corruption (fasttop): 0x0805c5c8 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7cd5a85]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7cd94f0]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb7ea1b11]
/home/mecklen/work/boost-install/lib/libboost_serialization-gcc42-mt-1_36.so.1.36.0(_ZN5boost13serialization6detail27extended_type_info_typeid_015type_unregisterEv+0xf6)[0xb7f3c8d6]
./serio(_ZN5boost13serialization25extended_type_info_typeidI4DataED1Ev+0x1c)[0x805576a]
./serio(__gxx_personality_v0+0x35e)[0x8053f36]
/lib/tls/i686/cmov/libc.so.6(exit+0xd4)[0xb7c98084]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe8)[0xb7c80458]
./serio(__gxx_personality_v0+0x69)[0x8053c41]
The problem I'm experiencing only seems to occur when the class
implementation is in a shared library. I have attached a simple
example that reproduces the bug.
My system details are:
Intel i686 cpu
Ubuntu Hardy Heron
g++ (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
libstdc++6-4.2-dev 4.2.3-2ubuntu7
Boost 1.36.0
./configure --prefix=/home/mecklen/work/boost-install \
--without-libraries=python \
--without-icu --without-mpi
This is a real show-stopper for us. Any help would be greatly
appreciated.
Thanks,
--
Robert
// g++ -I/home/mecklen/work/boost-install/include/boost-1_36 serio.cpp -o serio -L/home/mecklen/work/boost-install/lib/ -lboost_serialization-gcc42-mt -lboost_unit_test_framework-gcc42-mt
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#include