On Apr 27, 12:09 am, santhosh.fernandes <spamt...@[EMAIL PROTECTED]
> wrote:
> 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<char, std::char_traits<char>,
> std::allocator<char> >::basic_string ()
> from /usr/lib/libstdc++.so.5
> #2 0x080764a2 in pair (this=0x2697880, __a=@[EMAIL PROTECTED]
> __b=@[EMAIL PROTECTED]
) at /usr/include/g++/bits/stl_pair.h:84
>
> Sever is running SLES 9 SP4.
>
> Anybody has come across similar error and can they suggest me to how
> resolve this issue?
>
> Thanks
> Santhosh
Is that object being concurrently accessed from different threads? If
it is, is it thread-safe? If it's not, did you incor****ate any
synchronization primitives to make sure every thread has an exclusive
access to the object and it's not possible for several threads to
modify it at the same time or read it when it's in some intermediate
state (being modified by some other thread)?
I also think asking this question in the appropriate C++ group would
be helpful.
Alex


|