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]

Re: "Interesting" behavior in std::locale


On 31/10/14 12:07 -0400, James Benze wrote:
I found this code because helgrind (valgrind's data-race finder) lit
up like a lightbulb with all these placement-new calls to the same
array.  It's obviously safe...the locale returned by
std::locale::classic is guaranteed never to change so it's essentially
just writing the same chunk of memory over and over.

N.B. you need to rebuild the library with some helgrind annotations to
remove some false positives in the locale::_Impl code, see
https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html#debug.races

There may be other real races that helgind finds though.


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