diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:27 +0000 |
commit | 316d58822dada9440bd06ecfc758dcc2364d617c (patch) | |
tree | fe72ec2e6ce9a360dda74d9d57f7acdb0e3c39d6 /test/asan/TestCases/use-after-scope-loop-bug.cc | |
parent | 0230fcf22fe7d19f03d981c9c2c59a3db0b72ea5 (diff) |
Diffstat (limited to 'test/asan/TestCases/use-after-scope-loop-bug.cc')
-rw-r--r-- | test/asan/TestCases/use-after-scope-loop-bug.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/asan/TestCases/use-after-scope-loop-bug.cc b/test/asan/TestCases/use-after-scope-loop-bug.cc index 6ad9bf3260cc..d4b12eca9808 100644 --- a/test/asan/TestCases/use-after-scope-loop-bug.cc +++ b/test/asan/TestCases/use-after-scope-loop-bug.cc @@ -1,10 +1,7 @@ // RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \ // RUN: not %run %t 2>&1 | FileCheck %s -// -// FIXME: @llvm.lifetime.* are not emitted for x. -// XFAIL: * -int *p; +volatile int *p; int main() { // Variable goes in and out of scope. @@ -13,4 +10,8 @@ int main() { p = x + i; } return *p; // BOOM + // CHECK: ERROR: AddressSanitizer: stack-use-after-scope + // CHECK: #0 0x{{.*}} in main {{.*}}use-after-scope-loop-bug.cc:[[@LINE-2]] + // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame + // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x' } |