[PATCH] D30283: [ubsan] Reduce alignment checking of C++ object pointers

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 21 17:19:28 PDT 2017


vsk added a comment.

In https://reviews.llvm.org/D30283#707007, @efriedma wrote:

> It's possible to misalign a global definition by misaligning its section with a linker script... but we can probably ignore that possibility.


The current implementation does ignore this case.

> It's very easy to misalign global declaration, though; for example: [...]

Thanks for pointing this out, I hadn't thought of this case! The current patch does not regress UBSan checking in this area. I'll upload a new test that demonstrates this.


https://reviews.llvm.org/D30283





More information about the cfe-commits mailing list