c++ - SIGSEGV in _dl_fini -
i hoping insights debugging problem have been wrestling 2 days now. situation
- i working on 2 shared object files, let's call them
libmya.so,libmyb.so, part of product. - these 2 shared object files each link 2 static library,
libmyc.a,libmyd.a libmya.so,libmyb.sohave unit tests command line executables invoke of functions exported shared objects,blackboxa,blackboxb.libmyb.somakes used of functions exportedlibmya.so. few functions oflibmya.soinvoked in init function oflibmyb.so(just generation of few stl containers).
what happens this:
blackboxaruns smooth , passes tests.blackboxbpasses tests, upon termination raisessigsegv.
gdb tells me sigsegvhappens during execution of finalizer of libmyb.so inside destructor of std::basic_string<char> object:
#0 0x00007ffff74a0bc3 in ?? () /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007ffff74a0c13 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() () /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #2 0x00007ffff6b6cd1d in __cxa_finalize (d=0x7ffff7dd4d80) @ cxa_finalize.c:56 #3 0x00007ffff7b1d7b6 in __do_global_dtors_aux () ./libminoscvc.so.3 #4 0x00007fffffffe3a0 in ?? () #5 0x00007fffffffe480 in ?? () #6 0x00007ffff7b9a541 in _fini () ./libminoscvc.so.3 #7 0x00007fffffffe480 in ?? () #8 0x00007ffff7de992d in _dl_fini () @ dl-fini.c:259 i aware, std::string objects defined @ global or namespace scope in static library may problematic when static library linked more 1 shared object in process, , have skimmed libmyc.a , libmyd.a string objects @ scoped without success far.
i have modified blackboxb extent main function consisted of return 0 - sigsegv persisted. if modify libmyb.so longer call libmya.so in init function sigsegvvanishes.
is there means not aware of detecting actual object libc trying clean when sigsegv happens? gdb did point out std::string destructor, nothing beyond (even access std::string members not possible). valgrind not help, either...
oh, forgot cherry on top: when built -o0 works, -o2 build crashes.
thanks input on nightmare...
Comments
Post a Comment