diff options
author | Matt Morehouse <mascasa@google.com> | 2018-01-10 20:27:48 +0000 |
---|---|---|
committer | Matt Morehouse <mascasa@google.com> | 2018-01-10 20:27:48 +0000 |
commit | 0d034354cd78e378044ae071aab5673db0bd13fa (patch) | |
tree | b175f7f7c49a908a869616e231acb58f3748b0f3 /test/CodeGenCXX/sanitize-no-dtor-callback.cpp | |
parent | f3d739418b264a3967db2f56aee3df4ed2f8d45b (diff) |
[MSan] Enable use-after-dtor instrumentation by default.
Summary:
Enable the compile-time flag -fsanitize-memory-use-after-dtor by
default. Note that the run-time option MSAN_OPTIONS=poison_in_dtor=1
still needs to be enabled for destructors to be poisoned.
Reviewers: eugenis, vitalybuka, kcc
Reviewed By: eugenis, vitalybuka
Subscribers: cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D37860
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/sanitize-no-dtor-callback.cpp')
-rw-r--r-- | test/CodeGenCXX/sanitize-no-dtor-callback.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/CodeGenCXX/sanitize-no-dtor-callback.cpp b/test/CodeGenCXX/sanitize-no-dtor-callback.cpp index 2c35576621..afc5382eb4 100644 --- a/test/CodeGenCXX/sanitize-no-dtor-callback.cpp +++ b/test/CodeGenCXX/sanitize-no-dtor-callback.cpp @@ -1,8 +1,9 @@ -// Test without the flag -fsanitize-memory-use-after-dtor, to ensure that +// Test with the flag -fno-sanitize-memory-use-after-dtor, to ensure that // instrumentation is not erroneously inserted -// RUN: %clang_cc1 -fsanitize=memory -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsanitize=memory -fno-sanitize-memory-use-after-dtor -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s struct Simple { + int x; ~Simple() {} }; Simple s; @@ -10,6 +11,7 @@ Simple s; // CHECK-NOT: call void @__sanitizer_dtor_callback struct Inlined { + int x; inline ~Inlined() {} }; Inlined i; |