[PATCH] D40940: [ubsan] Use pass_object_size info in bounds checks

George Burgess IV via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 8 12:04:28 PST 2017


george.burgess.iv added a comment.

> That said, one of the upsides of the current ubsan is that whether it will produce a diagnostic is predictable (as long as you don't use uninitialized data); you lose that to some extent with llvm.objectsize because it depends on the optimizer.

True. If that's not desirable to have in `array-bounds`, we could potentially move these checks under `-fsanitize=object-size` instead. We'd just have to be careful about not emitting `object-size` and `array-bounds` checks for the same array access.


https://reviews.llvm.org/D40940





More information about the cfe-commits mailing list