From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1697 invoked by alias); 6 Dec 2013 17:11:41 -0000 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 Received: (qmail 1651 invoked by uid 48); 6 Dec 2013 17:11:38 -0000 From: "kcc at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/59410] Some tsan tests fail with 4GB RAM Date: Fri, 06 Dec 2013 17:11: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-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kcc at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg00534.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59410 --- Comment #16 from Kostya Serebryany --- > Kernel is free to load PIE at ANY address it wants. But > you can specify where to load PIE via a linker switch > > -Ttext-segment 0x855555000000 > > to tell kernel to load PIE to a specific address. Hm. Interesting. What do I do wrong? % clang++ simple_race.cc -fsanitize=thread -Wl,-Ttext-segment=0x7d0000000000 ; (setarch x86_64 -R ./a.out ) FATAL: ThreadSanitizer can not mmap the shadow memory (something is mapped at 0x555555554000 < 0x7cf000000000) FATAL: Make sure to compile with -fPIE and to link with -pie. % clang++ simple_race.cc -fsanitize=thread ; (setarch x86_64 -R ./a.out ) FATAL: ThreadSanitizer can not mmap the shadow memory (something is mapped at 0x555555554000 < 0x7cf000000000) FATAL: Make sure to compile with -fPIE and to link with -pie. % clang++ simple_race.cc -fsanitize=thread ; ( ./a.out ) ================== WARNING: ThreadSanitizer: data race (pid=6559)