[PATCH] D16702: [cfi] Safe handling of unaddressable vtable pointers.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 18:29:38 PST 2016


pcc added inline comments.

================
Comment at: lib/ubsan/ubsan_type_hash_itanium.cc:212
@@ -193,3 +211,3 @@
 };
-VtablePrefix *getVtablePrefix(void *Vtable) {
+VtablePrefix *getVtablePrefix(void *Vtable, bool Safe) {
   VtablePrefix *Vptr = reinterpret_cast<VtablePrefix*>(Vtable);
----------------
I don't think we should add a parameter to make the checking optional unless we know that it is necessary. Have you measured the perf impact on UBSan? (Note that UBSan is already calling `getDynamicTypeInfoFromVtable` on every cache miss).


Repository:
  rL LLVM

http://reviews.llvm.org/D16702





More information about the llvm-commits mailing list