[Bug sanitizer/78158] Strange data race detection with thread sanitizer

dvyukov at google dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 20 13:24:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78158

--- Comment #3 from Dmitry Vyukov <dvyukov at google dot com> ---
Also reported on stackoverflow:
http://stackoverflow.com/questions/37552866/why-does-threadsanitizer-report-a-race-with-this-lock-free-example

I've checked with
gcc version 7.0.1 20170307 (experimental) (GCC)
with -O0 false race is reported
with -O1 no false races reported.
Again atomic operation somehow end up being non-instrumented with -O0.


More information about the Gcc-bugs mailing list