[PATCH] [ubsan] fix vptr test on ARM

Richard Smith richard at metafoo.co.uk
Tue May 13 19:37:08 PDT 2014


I see, the problem is that we're accidentally relying on the stack buffer 'Buffer' being 8-byte aligned.

================
Comment at: test/ubsan/TestCases/TypeCheck/vptr.cpp:89
@@ -88,3 +88,3 @@
     // CHECK-NULL-MEMBER-NEXT: [[PTR]]: note: object has invalid vptr
-    // CHECK-NULL-MEMBER-NEXT: {{^ .. .. .. ..  00 00 00 00 00 00 00 00  }}
+    // CHECK-NULL-MEMBER-NEXT: {{^ ( )?.. .. .. .. ( )?00 00 00 00 (00 00 00 00 )? }}
     // CHECK-NULL-MEMBER-NEXT: {{^              \^~~~~~~~~~~(~~~~~~~~~~~~)? *$}}
----------------
Please add an optional extra space between the two groups of 0s rather than making the second group optional.

You don't need the parens around the optional spaces.

http://reviews.llvm.org/D3751






More information about the llvm-commits mailing list