This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Crash in std string functions - gcc 3.4.5


I have a multi-threaded application that I build using gcc 3.2.2 on RHAS
3.0. When I try to execute this application on a RHAS 4.0 machine (that
has gcc 3.4.5 installed), I get a number of crashes, most of them in
std::string functions. Surprisingly most of the crashes get resolved
when I do a reserve() on the culprit std::string object. However
resolving one crash leads to another and it seems that I need a patch to
fix this problem rather than making large scale changes in my code.
Given below is a sample of 2 core dumps that I got. Please note that
this application runs fine on RHAS 3.0. It is only when I run the
aplication in RHAS 4.0 that hell breaks loose.

Please let me know, where I can find the patch to fix this problem.


 
(gdb) bt
#0  0x02710652 in std::__default_alloc_template<true, 0>::allocate ()
from /usr/lib/libstdc++.so.5
#1  0x02715e18 in std::string::_Rep::_S_create () from
/usr/lib/libstdc++.so.5
#2  0x02712c8d in std::string::_M_mutate () from /usr/lib/libstdc++.so.5
#3  0x02713d98 in std::string::clear () from /usr/lib/libstdc++.so.5
#4  0x05a69561 in ServiceHandlerBase::Split () from
/home/infsmdv/aveek/CA/application/lib/libService.so
#5  0x05a83c68 in ServiceHandlerSearch::ProcessRequest () from
/home/infsmdv/aveek/CA/application/lib/libService.so
#6  0x05a51104 in InvokeHandler () from
/home/infsmdv/aveek/CA/application/lib/libService.so
#7  0x05a5167f in Search () from
/home/infsmdv/aveek/CA/application/lib/libService.so
#8  0x00342adc in Server::Tunnel () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#9  0x0033c1af in Server::ProcessRequest () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#10 0x0032bf06 in MessageHandler::DoWork ()
/home/infsmdv/aveek/CA/application/lib/libutils.so
#11 0x00328fb7 in ThreadPool::Run () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#12 0x00395f24 in ThreadPoolBase::ThreadProc () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#13 0x004e0805 in BtThreadBase () from
/home/infsmdv/aveek/CA/application/lib/libplatform.so
#14 0x0075d371 in start_thread () from /lib/tls/libpthread.so.0
#15 0x02c359be in clone () from /lib/tls/libc.so.6
 
(gdb) bt
#0  0x02524652 in std::__default_alloc_template<true, 0>::allocate ()
from /usr/lib/libstdc++.so.5
#1  0x02529e18 in std::string::_Rep::_S_create () from
/usr/lib/libstdc++.so.5
#2  0x02526c8d in std::string::_M_mutate () from /usr/lib/libstdc++.so.5
#3  0x0252a9b3 in std::string::_M_replace_safe<char const*> () from
/usr/lib/libstdc++.so.5
#4  0x0252854c in std::string::assign () from /usr/lib/libstdc++.so.5
#5  0x02527785 in std::string::operator= () from /usr/lib/libstdc++.so.5
#6  0x0293c345 in Object::getAttributeString () from
/home/infsmdv/aveek/CA/application/lib/libObject.so
#7  0x02e03092 in ServiceHandlerSearch::ProcessRequest () from
/home/infsmdv/aveek/CA/application/lib/libService.so
#8  0x02dd0144 in InvokeHandler () from
/home/infsmdv/aveek/CA/application/lib/libService.so
#9  0x02dd06bf in Search () from
/home/infsmdv/aveek/CA/application/lib/libService.so
#10 0x00815adc in Server::Tunnel () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#11 0x0080f1af in Server::ProcessRequest () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#12 0x007fef06 in MessageHandler::DoWork () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#13 0x007fbfb7 in ThreadPool::Run () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#14 0x00868f24 in ThreadPoolBase::ThreadProc () from
/home/infsmdv/aveek/CA/application/lib/libutils.so
#15 0x003ab805 in BtThreadBase () from
/home/infsmdv/aveek/CA/application/lib/libplatform.so
#16 0x002f3371 in start_thread () from /lib/tls/libpthread.so.0
#17 0x01a1d9be in clone () from /lib/tls/libc.so.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]