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


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

Re: basic_string::release and thread safety: what about basic_string::grab?


Joe Buck wrote:

> The v2 version of basic_string::Rep::release has been changed to be
> thread-safe on the x86 and sparc platforms by using atomic instructions
> to decrement the reference count.  However, basic_string::Rep::grab, which
> increments the reference count, is not protected.

I have a tangential topic related to this, since you've brought it up: how
are these thread-safety issues with string coming to light? Can you post
specific code samples to demonstrate or reproduce them? It would be nice if I
could quickly see where both v-2 and v-3 stood, and since none of the
commercial test suites explicitly test for MT-safe issues, I am left with
this grab-bag of random test cases I've accumulated over the last year.

Thanks,
Benjamin





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