[PATCH] UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbases
Alexey Samsonov
vonosmas at gmail.com
Wed Nov 5 19:24:48 PST 2014
LGTM. Thanks for doing this!
================
Comment at: lib/ubsan/ubsan_type_hash.cc:143
@@ +142,3 @@
+ abi::__base_class_type_info::__virtual_mask) {
+ const char *VTable = *reinterpret_cast<const char *const *>(Object);
+ OffsetHere = *reinterpret_cast<const sptr *>(VTable + OffsetHere);
----------------
Can this be
sptr VTable = *reinterpret_cast<sptr *>(Object);
OffsetHere = *reinterpret_cast<sptr *>(VTable + OffsetHere);
?
http://reviews.llvm.org/D6074
More information about the llvm-commits
mailing list