Hi all!
I have a problem with STL string.
My program segfaults after a period of time, it can run perfectly for
days and than die after a week, and when it segfaults it doesn't have to
be at the same place. This is a backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 580.0x7b0]
0x00485f66 in std::__default_ alloc_template< true, 0>::allocate(un signed) ()
(gdb) bt
#0 0x00485f66 in std::__default_ alloc_template< true,
0>::allocate(un signed) ()
#1 0x0047e0ec in std::string::_R ep::_S_create(u nsigned,
std::allocator< char> const&) ()
#2 0x0047dfed in std::string::_R ep::_M_clone(st d::allocator<ch ar>
const&, unsigned) ()
#3 0x0047f4d1 in std::string::re serve(unsigned) ()
#4 0x0047e5f5 in std::string::ap pend(unsigned, char) ()
#5 0x004801c2 in std::string::op erator+=(char) ()
#6 0x00415fdd in T10::enable_del ivery() ()
#7 0x004133f7 in T10::process_st atus() ()
#8 0x0040bd80 in T10::process_co mmand(char*, char*) ()
#9 0x0040688e in PSS::z3(int) ()
#10 0x00405eee in PSS::switch_sta tes(int) ()
#11 0x00404cba in PSS::pss_crunch er(std::string& ) ()
#12 0x0041ba83 in V11_2::s9() ()
#13 0x0041a773 in V11_2::runner() ()
#14 0x0041a68b in V11_2::v11_star ter(int) ()
This is just an example how it dies, but bt is always the same from
"std::string::o perator+=(char) ()" upwards!
Threading is minimal and critical sections are used, OS is Win2K and
compiler is mingw (gcc version 3.2.3 (mingw special 20030504-1)).
Help!
I have a problem with STL string.
My program segfaults after a period of time, it can run perfectly for
days and than die after a week, and when it segfaults it doesn't have to
be at the same place. This is a backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 580.0x7b0]
0x00485f66 in std::__default_ alloc_template< true, 0>::allocate(un signed) ()
(gdb) bt
#0 0x00485f66 in std::__default_ alloc_template< true,
0>::allocate(un signed) ()
#1 0x0047e0ec in std::string::_R ep::_S_create(u nsigned,
std::allocator< char> const&) ()
#2 0x0047dfed in std::string::_R ep::_M_clone(st d::allocator<ch ar>
const&, unsigned) ()
#3 0x0047f4d1 in std::string::re serve(unsigned) ()
#4 0x0047e5f5 in std::string::ap pend(unsigned, char) ()
#5 0x004801c2 in std::string::op erator+=(char) ()
#6 0x00415fdd in T10::enable_del ivery() ()
#7 0x004133f7 in T10::process_st atus() ()
#8 0x0040bd80 in T10::process_co mmand(char*, char*) ()
#9 0x0040688e in PSS::z3(int) ()
#10 0x00405eee in PSS::switch_sta tes(int) ()
#11 0x00404cba in PSS::pss_crunch er(std::string& ) ()
#12 0x0041ba83 in V11_2::s9() ()
#13 0x0041a773 in V11_2::runner() ()
#14 0x0041a68b in V11_2::v11_star ter(int) ()
This is just an example how it dies, but bt is always the same from
"std::string::o perator+=(char) ()" upwards!
Threading is minimal and critical sections are used, OS is Win2K and
compiler is mingw (gcc version 3.2.3 (mingw special 20030504-1)).
Help!
Comment