[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

segmentation fault in std::vector...



Title: segmentation fault in std::vector...

hi all,

in our application we are using the vector class of the c++ stl. after a few hours a segmentation fault happens somewhere in the vector class (see core dump below). did anyone experienced similar problems in the stl? we also see that the free memory decreases step by step. Maybe there is a memory leak within the stl?

There are also some inconsistency while loading the shared library /lib/libstdc++-2.so.3 (see below). any ideas?

thanks,
thomas

bash-2.05a$ ./gdb -c core.260 imsswitchagent
GNU gdb 2001-12-21-cvs
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=cris"...
Core was generated by `imsswitchagent'.
Program terminated with signal 11, Segmentation fault.
Error while mapping shared library sections:
/lib/libstdc++-2.so.3: No such file or directory.
Error while mapping shared library sections:
/lib/ld.so.1: No such file or directory.
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Error while reading shared library symbols:
/lib/libstdc++-2.so.3: No such file or directory.
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Error while reading shared library symbols:
/lib/ld.so.1: No such file or directory.
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
#0  0x00085d92 in __default_alloc_template<false, 0>::allocate (__n=8)
    at /usr/local/cris/lib/gcc-lib/cris/2.96/g++-include/stl_alloc.h:422
422         *__my_free_list = __result -> _M_free_list_link;
(gdb) bt
#0  0x00085d92 in __default_alloc_template<false, 0>::allocate (__n=8)
    at /usr/local/cris/lib/gcc-lib/cris/2.96/g++-include/stl_alloc.h:422
#1  0x000d1980 in simple_alloc<SysSrv::CMarshal *, __default_alloc_template<false, 0> >::allocate (__n=2)
    at /usr/local/cris/lib/gcc-lib/cris/2.96/g++-include/stl_alloc.h:228
#2  0x000d186e in _Vector_alloc_base<SysSrv::CMarshal *, allocator<SysSrv::CMarshal *>, true>::_M_allocate (this=0x100,
    __n=256) at /usr/local/cris/lib/gcc-lib/cris/2.96/g++-include/stl_vector.h:93
#3  0x000d165c in vector<SysSrv::CMarshal *, allocator<SysSrv::CMarshal *> >::_M_insert_aux (this=0xaf1ff7f6,
    __position=0x16ba1c, __x=@xxxxxxx.h:600
#4  0x000d1492 in vector<SysSrv::CMarshal *, allocator<SysSrv::CMarshal *> >::push_back (this=0xaf1ff7f6, __x=@0xaf1ff6d8)

    at /usr/local/cris/lib/gcc-lib/cris/2.96/g++-include/stl_vector.h:325
#5  0x000d1320 in SysSrv::CMultiMarshal::push_back (this=0x100, item=@0xaf1ff80a)
    at /local/home/schwere/Devel/msw/src/pkg/syssrv/multimarshal.cpp:86
#6  0x000b0b0e in ComLayer::CInternetID::initMarshal (this=0xaf1ff7f2)
    at /local/home/schwere/Devel/msw/src/pkg/comlayer/internetid.cpp:137
#7  0x000b0940 in ComLayer::CInternetID::CInternetID (this=0xaf1ff7f2, id=@0xaf1ff7a2)
    at /local/home/schwere/Devel/msw/src/pkg/comlayer/internetid.cpp:119
#8  0x000c67ee in ComLayer::CSrcDestInternetID::CSrcDestInternetID (this=0xaf1ff7e2, id=@0xaf1ff792)
    at /local/home/schwere/Devel/msw/src/pkg/comlayer/srcdestinternetid.cpp:78
#9  0x000c863a in ComLayer::CComLayerMsgHdr::CComLayerMsgHdr (this=0xaf1ff7de, srcDest=@0xaf1ff792, proxies=@0xaf1ff77a)

    at /local/home/schwere/Devel/msw/src/pkg/comlayer/comlayermsghdr.cpp:66
#10 0x000b2528 in ComLayer::CReceiver::updateRoutingTable (this=0x16bbb0, hdr=@0xaf1ff88a)
    at /local/home/schwere/Devel/msw/src/pkg/comlayer/receiver.cpp:191
#11 0x000b1eae in ComLayer::CReceiver::process (this=0x16bbb0, stream=<incomplete type>)
    at /local/home/schwere/Devel/msw/src/pkg/comlayer/receiver.cpp:125
#12 0x000be4a8 in ComLayer::CSocketReceiver::receive (this=0x16bc78, trans=@0x16d8f8)
    at /local/home/schwere/Devel/msw/src/pkg/comlayer/socketreceiver.cpp:202
#13 0x000be5da in ComLayer::CSocketReceiver::body (this=0x16bc78)
    at /local/home/schwere/Devel/msw/src/pkg/comlayer/socketreceiver.cpp:231
#14 0x000dc89e in OS::ThreadImplementation::body (this=0x16be30)
    at /local/home/schwere/Devel/msw/src/pkg/os/threadimplementation.cpp:39
#15 0x000db3d8 in OS::thread_func (arg=0x16be30) at /local/home/schwere/Devel/msw/src/pkg/os/pthreadthread.cpp:29
(gdb)