[PATCH] UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbases
David Majnemer
david.majnemer at gmail.com
Sat Nov 1 18:46:38 PDT 2014
Hi rsmith, samsonov,
When the __virtual_mask is set, __offset_flags >> __offset_shift yields
an offset into the vtable. Dereferencing this vtable slot gets us the
vbase offset.
Adjust a test case to verify that this, in fact, works.
http://reviews.llvm.org/D6074
Files:
lib/ubsan/ubsan_type_hash.cc
test/ubsan/TestCases/TypeCheck/vptr.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6074.15673.patch
Type: text/x-patch
Size: 4994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141102/a9f9349e/attachment.bin>
More information about the llvm-commits
mailing list