[PATCH] D16824: [cfi] Safe handling of unaddressable vtable pointers (compiler-rt).

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 12:34:08 PST 2016


pcc added inline comments.

================
Comment at: test/cfi/cross-dso/target_out_of_bounds.cpp:41
@@ +40,3 @@
+    for (uintptr_t *q = (uintptr_t *)p; q < (uintptr_t *)(p + sizeof(A)); ++q)
+      *q = v;
+    // CHECK-ZERO: runtime error: control flow integrity check for type 'A' failed during cast
----------------
eugenis wrote:
> pcc wrote:
> > Why not just `memset(p, 0, sizeof(A));`?
> Because that would test a different thing.
> 
Okay, I see. Please give the variables better names to make this code less confusing. Same for the other block. Please also change the loops to just an assignment of the vtable pointer.


Repository:
  rL LLVM

http://reviews.llvm.org/D16824





More information about the llvm-commits mailing list