http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076
--- Comment #7 from torvald at gcc dot gnu.org 2012-11-28 14:29:47 UTC ---
(In reply to comment #6)
There seems to be a similar bug in code generated for function static
variables.
The fast-path load is a plain load rather than atomic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076
--- Comment #2 from Richard Henderson rth at gcc dot gnu.org 2012-11-27
18:01:17 UTC ---
Are you sure this isn't a false-positive?
The way I read this code, it is certainly possible for the optimizer
(or the processor) to prefetch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076
Richard Henderson rth at gcc dot gnu.org changed:
What|Removed |Added
Status|UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076
--- Comment #4 from Richard Henderson rth at gcc dot gnu.org 2012-11-27
22:05:34 UTC ---
Created attachment 28798
-- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28798
proposed patch
This should fix the race that I eventually saw
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076
Dmitry Vyukov dvyukov at google dot com changed:
What|Removed |Added
CC||dvyukov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076
--- Comment #6 from Dmitry Vyukov dvyukov at google dot com 2012-11-28
03:56:50 UTC ---
There seems to be a similar bug in code generated for function static
variables.
The fast-path load is a plain load rather than atomic acquire load.