< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] segfault in SdpContents::Empty when linking statically


Hi

when using resip-1.1 I get a segfault when stopping my application. The crash
happens in the destruction of "const SdpContents SdpContents::Empty;" (in 
SdpContents.cxx line 18).

The strange thing is that this only happens when linking statically to 
libresip.a - when linking
against a shared library (libresip.so) it works fine.. has anyone seen this 
before?

The backtrace is below:


Program terminated with signal 11, Segmentation fault.
#0 0xb7e16e3c in std::_List_base<resip::Data, std::allocator<resip::Data> >::_M_clear (this=0x807f020) at /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/list.tcc:76
76                __cur = static_cast<_Node*>(__cur->_M_next);
(gdb) bt
#0 0xb7e16e3c in std::_List_base<resip::Data, std::allocator<resip::Data> >::_M_clear (this=0x807f020) at /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/list.tcc:76
#1  0xb7e16ee8 in ~_List_base (this=0x807f020) at 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_list.h:339
#2  0xb7e16f37 in ~list (this=0x807f020) at 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_list.h:399
#3  0xb7e16f4f in ~pair (this=0x807effc) at 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_pair.h:69
#4  0xb7e16f9f in __gnu_cxx::new_allocator<std::pair<resip::Data const, std::list<resip::Data, 
std::allocator<resip::Data> > > >::destroy (this=0xbf930663, __p=0x807effc)
    at 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/ext/new_allocator.h:107
#5 0xb7e172ab in __gnu_cxx::hashtable<std::pair<resip::Data const, std::list<resip::Data, std::allocator<resip::Data> > >, resip::Data, __gnu_cxx::hash<resip::Data>, std::_Select1st<std::pair<resip::Data const, std::list<resip::Data, std::allocator<resip::Data> > > >, std::equal_to<resip::Data>, std::allocator<std::list<resip::Data, std::allocator<resip::Data> > > >::_M_delete_node (this=0xb7fc7fc0, __n=0x807eff8)
    at 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/ext/hashtable.h:622
#6 0xb7e17333 in __gnu_cxx::hashtable<std::pair<resip::Data const, std::list<resip::Data, std::allocator<resip::Data> > >, resip::Data, __gnu_cxx::hash<resip::Data>, std::_Select1st<std::pair<resip::Data const, std::list<resip::Data, std::allocator<resip::Data> > > >, std::equal_to<resip::Data>, std::allocator<std::list<resip::Data, std::allocator<resip::Data> > > >::clear (this=0xb7fc7fc0)
    at 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/ext/hashtable.h:1086
#7  0xb7e174e2 in ~hashtable (this=0xb7fc7fc0) at 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/ext/hashtable.h:361
#8  0xb7e17567 in ~hash_map (this=0xb7fc7fc0) at 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/ext/hash_map:93
#9  0xb7e1757b in ~AttributeHelper (this=0xb7fc7fc0) at 
../../resip/stack/SdpContents.hxx:20
#10 0xb7e1ebe5 in ~Session (this=0xb7fc7cd0) at 
../../resip/stack/SdpContents.hxx:47
#11 0xb7e0ebbd in ~SdpContents (this=0xb7fc7c20) at SdpContents.cxx:171
#12 0xb7e0ec22 in __tcf_7 () at SdpContents.cxx:18
#13 0xb79b65d1 in __cxa_finalize () from /lib/tls/i686/cmov/libc.so.6
#14 0xb7db4bf3 in __do_global_dtors_aux () from /usr/lib/libkettle.so
#15 0xb7f095ac in _fini () from /usr/lib/libkettle.so
#16 0xb7fedede in _dl_fini () from /lib/ld-linux.so.2
#17 0xb79b63b0 in exit () from /lib/tls/i686/cmov/libc.so.6
#18 0xb799feb0 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#19 0x08048e01 in _start () at ../sysdeps/i386/elf/start.S:119