[Bug sanitizer/48076] Unsafe double checked locking in __emutls_get_address

2012-11-28 Thread torvald at gcc dot gnu.org
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

[Bug sanitizer/48076] Unsafe double checked locking in __emutls_get_address

2012-11-27 Thread rth at gcc dot gnu.org
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

[Bug sanitizer/48076] Unsafe double checked locking in __emutls_get_address

2012-11-27 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076 Richard Henderson rth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED

[Bug sanitizer/48076] Unsafe double checked locking in __emutls_get_address

2012-11-27 Thread rth at gcc dot gnu.org
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

[Bug sanitizer/48076] Unsafe double checked locking in __emutls_get_address

2012-11-27 Thread dvyukov at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48076 Dmitry Vyukov dvyukov at google dot com changed: What|Removed |Added CC||dvyukov

[Bug sanitizer/48076] Unsafe double checked locking in __emutls_get_address

2012-11-27 Thread dvyukov at google dot com
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.