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.
Paths
| Differential D6074
UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbases ClosedPublic Authored by majnemer on Nov 1 2014, 6:46 PM.
Details Summary When the virtual_mask is set, offset_flags >> __offset_shift yields Adjust a test case to verify that this, in fact, works.
Diff Detail
Event Timelinesamsonov edited edge metadata. Comment ActionsLGTM. Thanks for doing this!
This revision is now accepted and ready to land.Nov 5 2014, 7:24 PM
Revision Contents
Diff 15843 compiler-rt/trunk/lib/ubsan/ubsan_type_hash.cc
compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr.cpp
|