[PATCH] D18003: [tsan] Disable randomized address space on linux.
Adhemerval Zanella via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 02:30:27 PST 2016
zatrazz added inline comments.
================
Comment at: lib/tsan/rtl/tsan_platform_linux.cc:296
@@ +295,3 @@
+ int old_personality = personality(0xffffffff);
+ if (old_personality != -1 && (old_personality & ADDR_NO_RANDOMIZE) == 0) {
+ Report("WARNING: Program is run with randomized virtual address space,"
----------------
Is this correct? This test is checking if system is *not* using ASLR, not the contrary. I think the correct test should be
(old_personality & ADDR_NO_RANDOMIZE) == ADDR_NO_RANDOMIZE
================
Comment at: lib/tsan/rtl/tsan_platform_linux.cc:298
@@ +297,3 @@
+ Report("WARNING: Program is run with randomized virtual address space,"
+ " which wouldn't work with ThreadSanitizer.\n");
+ Report("Re-execing with fixed virtual address space.\n");
----------------
TSAN do work on aarch64 with ASLR, at least with kernel 3.19. I have not tested with a newer kernel, but I noticed it has now some VMA changes. Which is the environment that you seeing this failing?
http://reviews.llvm.org/D18003
More information about the llvm-commits
mailing list