This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/40362] openmp: some libgomp functions trigger data races
- 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: Sat, 29 Dec 2012 21:32:06 +0000
- Subject: [Bug libgomp/40362] openmp: some libgomp functions trigger data races
- Auto-submitted: auto-generated
- References: <bug-40362-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40362
--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-12-29 21:32:06 UTC ---
(In reply to comment #12)
> ws = gomp_ptrlock_get (&ws->next_ws);
This is really just:
ws = gomp_ptrlock_get (ws+offsetof(next_ws));
So there are no loads there. This is a race condition only if we go from
non-null to null which cannot happen here. TSAN cannot detect that as it does
not understand that case which is a complex case to understand
Also does TSAN understand futex's which might the other thing throwing it off
just as Hellgrtind and drd was thrown off by it.