[llvm-commits] [compiler-rt] r170388 - /compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp
Richard Smith
richard-llvm at metafoo.co.uk
Mon Dec 17 16:23:13 PST 2012
Author: rsmith
Date: Mon Dec 17 18:23:12 2012
New Revision: 170388
URL: http://llvm.org/viewvc/llvm-project?rev=170388&view=rev
Log:
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.
Modified:
compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp
Modified: compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp?rev=170388&r1=170387&r2=170388&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/TypeCheck/vptr.cpp Mon Dec 17 18:23:12 2012
@@ -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 @@
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':
More information about the llvm-commits
mailing list