[llvm] 73323c6 - [hwasan] re-enable stack safety by default.

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 13:11:47 PDT 2021


Author: Florian Mayer
Date: 2021-08-19T21:11:24+01:00
New Revision: 73323c6eaa221e9a4a3f73f86c3c8f14e9a322bf

URL: https://github.com/llvm/llvm-project/commit/73323c6eaa221e9a4a3f73f86c3c8f14e9a322bf
DIFF: https://github.com/llvm/llvm-project/commit/73323c6eaa221e9a4a3f73f86c3c8f14e9a322bf.diff

LOG: [hwasan] re-enable stack safety by default.

The failed assertion was fixed in D108337.

Reviewed By: vitalybuka, eugenis

Differential Revision: https://reviews.llvm.org/D108381

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
    llvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
index 9834d09bebcde..aa791eb286c8a 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -115,7 +115,7 @@ static cl::opt<bool> ClInstrumentStack("hwasan-instrument-stack",
                                        cl::Hidden, cl::init(true));
 
 static cl::opt<bool>
-    ClUseStackSafety("hwasan-use-stack-safety", cl::Hidden, cl::init(false),
+    ClUseStackSafety("hwasan-use-stack-safety", cl::Hidden, cl::init(true),
                      cl::Hidden, cl::desc("Use Stack Safety analysis results"),
                      cl::Optional);
 

diff  --git a/llvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll b/llvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll
index 766660a5c26f8..0c57028039696 100644
--- a/llvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll
+++ b/llvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll
@@ -1,5 +1,6 @@
 ; RUN: opt -hwasan -hwasan-use-stack-safety=1 -hwasan-generate-tags-with-calls -S < %s | FileCheck %s --check-prefixes=SAFETY
 ; RUN: opt -hwasan -hwasan-use-stack-safety=0 -hwasan-generate-tags-with-calls -S < %s | FileCheck %s --check-prefixes=NOSAFETY
+; RUN: opt -hwasan -hwasan-generate-tags-with-calls -S < %s | FileCheck %s --check-prefixes=SAFETY
 
 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
 target triple = "aarch64-unknown-linux-gnu"


        


More information about the llvm-commits mailing list