[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" (PR33430)

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 13 13:12:52 PDT 2017


vsk added a comment.

In https://reviews.llvm.org/D34121#808486, @dtzWill wrote:

> In https://reviews.llvm.org/D34121#806978, @vsk wrote:
>
> > @dtzWill do you have any further comments on this one?
> >
> > I'd like to get another 'lgtm' before committing, and it'd be nice to get this in before llvm 5.0 branches (7/19).
> >
> > FWIW we've been living on this for a few weeks internally without any issues:
> >  https://github.com/apple/swift-clang/commit/3ebe7d87b9d545aebdd80452d0b79695ff871bce
>
>
> @vsk sorry for the delay.  Looks solid to me, seems to work well in my testing.
>
> Unrelated to the suitability of the patch itself, but on the subject:
>  Interestingly there don''t seem to be any changes in observed errors, which on one hand is great (yay no breakage and earlier results were mostly correct) but on the other isn't what I expected.
>  Does this match your experiences?


Thanks for testing the patch out! Your results match my experiences with some Apple frameworks. The 'p - unsigned > p' case seems to be relatively uncommon.


https://reviews.llvm.org/D34121





More information about the cfe-commits mailing list