This change attempts to safely check the cast validity, even when
vtable itself, or its typeinfo object, are unaddressable. The check
is quite slow (requires a system call), so we only do this when an
error is already detected to avoid slowing down the vptr sanitizer.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/ubsan/ubsan_type_hash_itanium.cc | ||
---|---|---|
212 | 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). |
lib/ubsan/ubsan_type_hash_itanium.cc | ||
---|---|---|
212 | Not on every cache miss. On every check failure, right before consulting the blacklist and printing a report. |
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).