[PATCH] D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 19 12:03:41 PST 2017
vsk added a comment.
I don't think any checks can be skipped in the newly-introduced calls to EmitTypeCheck. Clang uses EmitDynamicCast on arbitrary addresses, not just addresses which are known to be checked for alignment/etc. Regarding the test update, I think it makes sense to extend the runtime test in vptr.cpp, but that we'd also benefit from a small/narrow IR test (e.g in test/CodeGenCXX/ubsan-vtable-checks.cpp). With the added test I think this patch would be in great shape.
More information about the cfe-commits