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

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 10:54:47 PST 2016

eugenis 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);
pcc wrote:
> 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).
Not on every cache miss. On every check failure, right before consulting the blacklist and  printing a report.



More information about the llvm-commits mailing list