From 3a551363c4cdd54c939cd9cc969d45bc8f8e93d8 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Wed, 21 Oct 2015 20:47:00 +0000 Subject: [PATCH] Revert "MemorySanitizer does not require PIE." It actually does require PIE on some targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250944 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/SanitizerArgs.cpp | 2 +- test/Driver/fsanitize.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Driver/SanitizerArgs.cpp b/lib/Driver/SanitizerArgs.cpp index e939ec3b6f..8c417ef432 100644 --- a/lib/Driver/SanitizerArgs.cpp +++ b/lib/Driver/SanitizerArgs.cpp @@ -29,7 +29,7 @@ enum : SanitizerMask { NeedsUbsanRt = Undefined | Integer | CFI, NeedsUbsanCxxRt = Vptr | CFI, NotAllowedWithTrap = Vptr, - RequiresPIE = DataFlow, + RequiresPIE = Memory | DataFlow, NeedsUnwindTables = Address | Thread | Memory | DataFlow, SupportsCoverage = Address | Memory | Leak | Undefined | Integer | DataFlow, RecoverableByDefault = Undefined | Integer, diff --git a/test/Driver/fsanitize.c b/test/Driver/fsanitize.c index 606c0bd758..b9e525239d 100644 --- a/test/Driver/fsanitize.c +++ b/test/Driver/fsanitize.c @@ -146,9 +146,8 @@ // CHECK-TSAN-NO-PIE: "-mrelocation-model" "static" // RUN: %clang -target x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-NO-PIE -// CHECK-MSAN-NO-PIE-NOT: "-pie" -// CHECK-MSAN-NO-PIE: "-mrelocation-model" "static" -// CHECK-MSAN-NO-PIE-NOT: "-pie" +// CHECK-MSAN-NO-PIE: "-mrelocation-model" "pic" "-pic-level" "2" "-pie-level" "2" +// CHECK-MSAN-NO-PIE: "-pie" // RUN: %clang -target arm-linux-androideabi -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ANDROID-ASAN-NO-PIE // CHECK-ANDROID-ASAN-NO-PIE: "-mrelocation-model" "pic" "-pic-level" "2" "-pie-level" "2" -- 2.50.1