This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/67303] libgomp: ThreadSanitizer: data race in libgomp
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Aug 2015 08:00:17 +0000
- Subject: [Bug libgomp/67303] libgomp: ThreadSanitizer: data race in libgomp
- Auto-submitted: auto-generated
- References: <bug-67303-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67303
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a partly false negative. In the sense the load from ws->start just
needs to be __atomic_load(&ws->start, RELAX) to be correct. This in it of
itself is the same as what it is correctly doing. Just removes the error from
the thread santitizer.
The main reason why I say this is because we are doing a compare and swap loop
to check if ws->start has changed when doing the lock-less popping off the
stack.