[llvm] r357960 - hwasan: Enable -hwasan-allow-ifunc by default.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 17:25:59 PDT 2019
Author: pcc
Date: Mon Apr 8 17:25:59 2019
New Revision: 357960
URL: http://llvm.org/viewvc/llvm-project?rev=357960&view=rev
Log:
hwasan: Enable -hwasan-allow-ifunc by default.
It's been on in Android for a while without causing problems, so it's time
to make it the default and remove the flag.
Differential Revision: https://reviews.llvm.org/D60355
Modified:
llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/trunk/test/Instrumentation/HWAddressSanitizer/lazy-thread-init.ll
llvm/trunk/test/Instrumentation/HWAddressSanitizer/prologue.ll
Modified: llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp?rev=357960&r1=357959&r2=357960&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp Mon Apr 8 17:25:59 2019
@@ -160,10 +160,6 @@ static cl::opt<bool> ClInlineAllChecks("
cl::desc("inline all checks"),
cl::Hidden, cl::init(false));
-static cl::opt<bool> ClAllowIfunc("hwasan-allow-ifunc",
- cl::desc("allow the use of ifunc"),
- cl::Hidden, cl::init(false));
-
namespace {
/// An instrumentation pass implementing detection of addressability bugs
@@ -836,7 +832,7 @@ Value *HWAddressSanitizer::emitPrologue(
if (!Mapping.InTls)
return getDynamicShadowNonTls(IRB);
- if (ClAllowIfunc && !WithFrameRecord && TargetTriple.isAndroid())
+ if (!WithFrameRecord && TargetTriple.isAndroid())
return getDynamicShadowIfunc(IRB);
Value *SlotPtr = getHwasanThreadSlotPtr(IRB, IntptrTy);
Modified: llvm/trunk/test/Instrumentation/HWAddressSanitizer/lazy-thread-init.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/HWAddressSanitizer/lazy-thread-init.ll?rev=357960&r1=357959&r2=357960&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/HWAddressSanitizer/lazy-thread-init.ll (original)
+++ llvm/trunk/test/Instrumentation/HWAddressSanitizer/lazy-thread-init.ll Mon Apr 8 17:25:59 2019
@@ -1,4 +1,4 @@
-; RUN: opt -S -hwasan -hwasan-allow-ifunc < %s | FileCheck %s
+; RUN: opt -S -hwasan < %s | FileCheck %s
target triple = "aarch64--linux-android"
Modified: llvm/trunk/test/Instrumentation/HWAddressSanitizer/prologue.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/HWAddressSanitizer/prologue.ll?rev=357960&r1=357959&r2=357960&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/HWAddressSanitizer/prologue.ll (original)
+++ llvm/trunk/test/Instrumentation/HWAddressSanitizer/prologue.ll Mon Apr 8 17:25:59 2019
@@ -1,14 +1,14 @@
; Test -hwasan-with-ifunc flag.
;
-; RUN: opt -hwasan -hwasan-allow-ifunc -S < %s | \
+; RUN: opt -hwasan -S < %s | \
; RUN: FileCheck %s --check-prefixes=CHECK,CHECK-NOGLOBAL,CHECK-TLS,CHECK-HISTORY
-; RUN: opt -hwasan -hwasan-allow-ifunc -S -hwasan-with-ifunc=0 -hwasan-with-tls=1 -hwasan-record-stack-history=1 < %s | \
+; RUN: opt -hwasan -S -hwasan-with-ifunc=0 -hwasan-with-tls=1 -hwasan-record-stack-history=1 < %s | \
; RUN: FileCheck %s --check-prefixes=CHECK,CHECK-NOGLOBAL,CHECK-TLS,CHECK-HISTORY
-; RUN: opt -hwasan -hwasan-allow-ifunc -S -hwasan-with-ifunc=0 -hwasan-with-tls=1 -hwasan-record-stack-history=0 < %s | \
+; RUN: opt -hwasan -S -hwasan-with-ifunc=0 -hwasan-with-tls=1 -hwasan-record-stack-history=0 < %s | \
; RUN: FileCheck %s --check-prefixes=CHECK,CHECK-NOGLOBAL,CHECK-IFUNC,CHECK-NOHISTORY
-; RUN: opt -hwasan -hwasan-allow-ifunc -S -hwasan-with-ifunc=0 -hwasan-with-tls=0 < %s | \
+; RUN: opt -hwasan -S -hwasan-with-ifunc=0 -hwasan-with-tls=0 < %s | \
; RUN: FileCheck %s --check-prefixes=CHECK,CHECK-GLOBAL,CHECK-NOHISTORY
-; RUN: opt -hwasan -hwasan-allow-ifunc -S -hwasan-with-ifunc=1 -hwasan-with-tls=0 < %s | \
+; RUN: opt -hwasan -S -hwasan-with-ifunc=1 -hwasan-with-tls=0 < %s | \
; RUN: FileCheck %s --check-prefixes=CHECK,CHECk-NOGLOBAL,CHECK-IFUNC,CHECK-NOHISTORY
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
More information about the llvm-commits
mailing list