From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22343 invoked by alias); 10 Dec 2012 12:44:06 -0000 Received: (qmail 22213 invoked by uid 48); 10 Dec 2012 12:43:46 -0000 From: "Joost.VandeVondele at mat dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/55561] TSAN crashes for Fortran Date: Mon, 10 Dec 2012 12:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00969.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55561 --- Comment #7 from Joost VandeVondele 2012-12-10 12:43:42 UTC --- Now, compilation seems to go fine, but I'm not figuring out how to do it properly so it works at run time. I have: > gfortran -g -fsanitize=thread -fPIE PR55561.f90 > ./a.out FATAL: ThreadSanitizer can not mmap the shadow memory (something is mapped at 0x400000 < 0x7cf000000000) FATAL: Make sure to compile with -fPIE and to link with -pie. next try yields > gfortran -g -fsanitize=thread -fPIC -Wl,-pie PR55561.f90 /data/vjoost/gnu/binutils-2.22/install/bin/ld: error: /usr/lib/../lib64/crt1.o: requires unsupported dynamic reloc 11; recompile with -fPIC /data/vjoost/gnu/binutils-2.22/install/bin/ld: error: /data/vjoost/gnu/gcc_trunk/install/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/crtbegin.o: requires dynamic R_X86_64_32 reloc against '__TMC_END__' which may overflow at runtime; recompile with -fPIC Is there something wrong in the way I configured gcc or do I need a different command line ? ../gcc/configure --prefix=/data/vjoost/gnu/gcc_trunk/install --enable-languages=c,c++,fortran --disable-multilib --enable-plugins --enable-lto --disable-bootstrap