public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Joost.VandeVondele at mat dot ethz.ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/55561] TSAN: Fortran/OMP yields false positives
Date: Tue, 25 Dec 2012 19:30:00 -0000 [thread overview]
Message-ID: <bug-55561-4-9OzAZkWNck@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55561-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55561
--- Comment #15 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-12-25 19:30:15 UTC ---
(In reply to comment #13)
> (In reply to comment #12)
> > That's great that gcc tsan works for Fortran/OpenMP out of the box!
>
> I'm afraid it yields false positives.
The obvious solution to this seems to be that also the OMP runtime (libgomp)
must be compiled with -fsanitize=thread. If I do that, it appears to work.
That's cool, I will try to do some more testing.
A reasonable approach could be to build two versions of libgomp. One standard
one, and one sanitized one (libgomp_tsan ?). -fsanitize=thread -fopenmp could
link the second version automatically.
Just for those trying this out...
I used the following to build&install a sanitized libgomp (based on Jakub's
comments in PR55374 and a hack of mine (-L...)) after an initial normal build
cd /data/vjoost/gnu/gcc_trunk/obj/x86_64-unknown-linux-gnu/libgomp/
make clean
make CFLAGS="-std=gnu99 -g -O2 -fsanitize=thread" FCFLAGS="-g -O2
-fsanitize=thread"
LDFLAGS="-L/data/vjoost/gnu/gcc_trunk/obj/x86_64-unknown-linux-gnu/libsanitizer/tsan/.libs/
-B/data/vjoost/gnu/gcc_trunk/obj/x86_64-unknown-linux-gnu/libsanitizer/tsan/.libs/
-Wl,-rpath,/data/vjoost/gnu/gcc_trunk/obj/x86_64-unknown-linux-gnu/libsanitizer/tsan/.libs/
-fsanitize=thread"
cd /data/vjoost/gnu/gcc_trunk/obj/
make install
compilation as
gfortran -fopenmp -fsanitize=thread -pie -fPIC test.f90
next prev parent reply other threads:[~2012-12-25 19:30 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-02 8:16 [Bug sanitizer/55561] New: TSAN crashes for Fortran Joost.VandeVondele at mat dot ethz.ch
2012-12-02 9:21 ` [Bug sanitizer/55561] " dvyukov at google dot com
2012-12-02 9:30 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-02 9:36 ` dvyukov at google dot com
2012-12-02 10:28 ` kcc at gcc dot gnu.org
2012-12-02 21:11 ` jakub at gcc dot gnu.org
2012-12-03 7:42 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-10 12:44 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-10 12:47 ` pinskia at gcc dot gnu.org
2012-12-10 12:53 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-10 12:57 ` dvyukov at google dot com
2012-12-10 12:59 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-10 15:07 ` dvyukov at google dot com
2012-12-10 15:56 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-11 9:48 ` [Bug sanitizer/55561] TSAN: Fortran/OMP yields false positives Joost.VandeVondele at mat dot ethz.ch
2012-12-25 19:30 ` Joost.VandeVondele at mat dot ethz.ch [this message]
2012-12-25 20:23 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-26 19:35 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-29 9:33 ` dvyukov at google dot com
2012-12-29 9:38 ` dvyukov at google dot com
2012-12-29 10:13 ` dvyukov at google dot com
2012-12-29 10:21 ` dvyukov at google dot com
2012-12-30 9:03 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-30 9:58 ` dvyukov at google dot com
2012-12-30 10:11 ` dvyukov at google dot com
2012-12-30 14:53 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-30 17:07 ` dvyukov at google dot com
2012-12-30 19:57 ` Joost.VandeVondele at mat dot ethz.ch
2013-01-01 17:14 ` Joost.VandeVondele at mat dot ethz.ch
2013-01-02 9:09 ` dvyukov at google dot com
2013-01-02 9:44 ` jakub at gcc dot gnu.org
2013-01-02 10:28 ` dvyukov at google dot com
2013-01-07 21:35 ` Joost.VandeVondele at mat dot ethz.ch
2013-01-08 9:17 ` dvyukov at google dot com
2013-01-10 11:27 ` Joost.VandeVondele at mat dot ethz.ch
2013-01-10 11:37 ` jakub at gcc dot gnu.org
2013-01-31 7:43 ` amodra at gmail dot com
2013-01-31 14:29 ` jakub at gcc dot gnu.org
2013-01-31 16:57 ` jakub at gcc dot gnu.org
2013-02-01 20:00 ` dvyukov at google dot com
2013-03-29 8:11 ` [Bug sanitizer/55561] TSAN: provide a TSAN instrumented libgomp Joost.VandeVondele at mat dot ethz.ch
2013-06-03 13:21 ` dvyukov at google dot com
2014-01-21 12:44 ` emil.styrke at gmail dot com
2014-01-22 8:14 ` Joost.VandeVondele at mat dot ethz.ch
2014-05-08 19:49 ` roland at rschulz dot eu
2014-05-09 5:38 ` Joost.VandeVondele at mat dot ethz.ch
2014-05-09 10:26 ` dvyukov at google dot com
2014-05-14 19:17 ` Joost.VandeVondele at mat dot ethz.ch
2014-05-14 19:25 ` dvyukov at google dot com
2014-07-09 6:07 ` roland at rschulz dot eu
2014-07-09 7:12 ` jakub at gcc dot gnu.org
2014-07-09 7:17 ` Joost.VandeVondele at mat dot ethz.ch
2024-02-29 17:27 ` egallager at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-55561-4-9OzAZkWNck@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).