Trouble in multithread programming - Linux
This is a discussion on Trouble in multithread programming - Linux ; hi ,
I am writing multithread application on Linux x86. I have some
problems when I am using std::string. I am using libstdc++.so.5.0.6
and using pthread to do multi threading. My program crashes and the
errors are as the followings.
...
-
Trouble in multithread programming
hi ,
I am writing multithread application on Linux x86. I have some
problems when I am using std::string. I am using libstdc++.so.5.0.6
and using pthread to do multi threading. My program crashes and the
errors are as the followings.
0x00a94fe7 in std::string::_Rep::_M_grab () from /usr/lib/libstdc+
+.so.
5
#1 0x00a9512c in std::basic_string,
std::allocator >::basic_string ()
from /usr/lib/libstdc++.so.5
#2 0x080764a2 in pair (this=0x2697880, __a=@0x2697bd0,
__b=@0xb7e0c154) at /usr/include/g++/bits/stl_pair.h:84
Anybody has come across similar error and can they suggest me to how
resolve this issue?
Thanks
Santhosh
-
Re: Trouble in multithread programming
In <2f678b6d-ef72-4c51-b5c0-09665c513d1b@m3g2000hsc.googlegroups.com> santhosh.fernandes@gmail.com writes:
>hi ,
>I am writing multithread application on Linux x86. I have some
>problems when I am using std::string. I am using libstdc++.so.5.0.6
>and using pthread to do multi threading. My program crashes and the
>errors are as the followings.
>0x00a94fe7 in std::string::_Rep::_M_grab () from /usr/lib/libstdc+
>+.so.
>5
>#1 0x00a9512c in std::basic_string,
>std::allocator >::basic_string ()
> from /usr/lib/libstdc++.so.5
>#2 0x080764a2 in pair (this=0x2697880, __a=@0x2697bd0,
>__b=@0xb7e0c154) at /usr/include/g++/bits/stl_pair.h:84
Have a read of:
http://gcc.gnu.org/onlinedocs/libstd...01ch03s05.html
Hint: std::string does not use any internal locking, nor do the container
classes.
HTH,
Uli
--
Dipl. Inf. Ulrich Teichert|e-mail: Ulrich.Teichert@gmx.de | Listening to:
Stormweg 24 |Der Weisse Raum (Der Dritte Mann), Caligari
24539 Neumuenster, Germany|(Opération S), Looking For Action (Ghetto Ways)