diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-18 00:23:12 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-18 00:23:12 +0000 |
commit | 37a913ae8ff94669d3380a5f0d4a1045a795fd43 (patch) | |
tree | 565e70bcf088d8bda5334a6dae544bbcd68f6bf9 /compiler-rt/lib/ubsan | |
parent | be024a815053546cedf5c54c528426d8da8d2530 (diff) | |
download | bcm5719-llvm-37a913ae8ff94669d3380a5f0d4a1045a795fd43.tar.gz bcm5719-llvm-37a913ae8ff94669d3380a5f0d4a1045a795fd43.zip |
Rein ubsan's vptr sanitizer back a bit. Per core issue 453, binding a reference
to an object outside its lifetime does not have undefined behavior.
llvm-svn: 170388
Diffstat (limited to 'compiler-rt/lib/ubsan')
-rw-r--r-- | compiler-rt/lib/ubsan/lit_tests/TypeCheck/vptr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler-rt/lib/ubsan/lit_tests/TypeCheck/vptr.cpp b/compiler-rt/lib/ubsan/lit_tests/TypeCheck/vptr.cpp index 65335688fc2..bce3fd9347d 100644 --- a/compiler-rt/lib/ubsan/lit_tests/TypeCheck/vptr.cpp +++ b/compiler-rt/lib/ubsan/lit_tests/TypeCheck/vptr.cpp @@ -1,10 +1,9 @@ // RUN: %clang -ccc-cxx -fsanitize=vptr %s -O3 -o %t // RUN: %t rT && %t mT && %t fT // RUN: %t rU && %t mU && %t fU -// RUN: %t rS 2>&1 | FileCheck %s --check-prefix=CHECK-REFERENCE +// RUN: %t rS && %t rV // RUN: %t mS 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER // RUN: %t fS 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN -// RUN: %t rV 2>&1 | FileCheck %s --check-prefix=CHECK-REFERENCE // RUN: %t mV 2>&1 | FileCheck %s --check-prefix=CHECK-MEMBER // RUN: %t fV 2>&1 | FileCheck %s --check-prefix=CHECK-MEMFUN @@ -64,7 +63,7 @@ int main(int, char **argv) { switch (argv[1][0]) { case 'r': - // CHECK-REFERENCE: vptr.cpp:[[@LINE+1]]:13: runtime error: reference binding to address 0x{{[0-9a-f]*}} which does not point to an object of type 'T' + // Binding a reference to storage of appropriate size and alignment is OK. {T &r = *p;} break; case 'm': |