mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:40:38 +00:00
Rename asan-check-lifetime into asan-stack-use-after-scope
Summary: This is done for consistency with asan-use-after-return. I see no other users than tests. Reviewers: aizatsky, kcc Differential Revision: http://reviews.llvm.org/D19306 llvm-svn: 266906
This commit is contained in:
parent
05ccfac388
commit
d328bd016e
@ -164,6 +164,9 @@ static cl::opt<bool> ClStack("asan-stack", cl::desc("Handle stack memory"),
|
||||
static cl::opt<bool> ClUseAfterReturn("asan-use-after-return",
|
||||
cl::desc("Check return-after-free"),
|
||||
cl::Hidden, cl::init(true));
|
||||
static cl::opt<bool> ClUseAfterScope("asan-use-after-scope",
|
||||
cl::desc("Check stack-use-after-scope"),
|
||||
cl::Hidden, cl::init(false));
|
||||
// This flag may need to be replaced with -f[no]asan-globals.
|
||||
static cl::opt<bool> ClGlobals("asan-globals",
|
||||
cl::desc("Handle global objects"), cl::Hidden,
|
||||
@ -219,11 +222,6 @@ static cl::opt<bool> ClOptStack(
|
||||
"asan-opt-stack", cl::desc("Don't instrument scalar stack variables"),
|
||||
cl::Hidden, cl::init(false));
|
||||
|
||||
static cl::opt<bool> ClCheckLifetime(
|
||||
"asan-check-lifetime",
|
||||
cl::desc("Use llvm.lifetime intrinsics to insert extra checks"), cl::Hidden,
|
||||
cl::init(false));
|
||||
|
||||
static cl::opt<bool> ClDynamicAllocaStack(
|
||||
"asan-stack-dynamic-alloca",
|
||||
cl::desc("Use dynamic alloca to represent stack variables"), cl::Hidden,
|
||||
@ -714,7 +712,7 @@ struct FunctionStackPoisoner : public InstVisitor<FunctionStackPoisoner> {
|
||||
Intrinsic::ID ID = II.getIntrinsicID();
|
||||
if (ID == Intrinsic::stackrestore) StackRestoreVec.push_back(&II);
|
||||
if (ID == Intrinsic::localescape) LocalEscapeCall = &II;
|
||||
if (!ClCheckLifetime) return;
|
||||
if (!ClUseAfterScope) return;
|
||||
if (ID != Intrinsic::lifetime_start && ID != Intrinsic::lifetime_end)
|
||||
return;
|
||||
// Found lifetime intrinsic, add ASan instrumentation if necessary.
|
||||
|
@ -1,5 +1,5 @@
|
||||
; Test handling of llvm.lifetime intrinsics in UAR mode.
|
||||
; RUN: opt < %s -asan -asan-module -asan-use-after-return -asan-check-lifetime -S | FileCheck %s
|
||||
; RUN: opt < %s -asan -asan-module -asan-use-after-return -asan-use-after-scope -S | FileCheck %s
|
||||
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
; Test hanlding of llvm.lifetime intrinsics.
|
||||
; RUN: opt < %s -asan -asan-module -asan-check-lifetime -asan-use-after-return=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -asan -asan-module -asan-use-after-scope -asan-use-after-return=0 -S | FileCheck %s
|
||||
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
Loading…
Reference in New Issue
Block a user