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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes this is probably because the implementation of atomic::wait and notify
moved from the headers into the library, so it's the usual situation that you
can't use TSan unless you recompile the *entire* application.

But the program is not correct in general: atomic::wait can wake spuriously, so
there is not guaranteed that atomic::store happens-before the return from
atomic::wait. If you get a spurious wake, you might have a data race on the
'data' object.

Reply via email to