Re: [PATCH] Fix IFN_OBJECT_SIZE expansion (PR sanitizer/65081)

2015-02-18 Thread Jakub Jelinek
On Wed, Feb 18, 2015 at 10:15:03AM +0100, Marek Polacek wrote: > We're lacking the POINTER_DIFF_EXPR, which means that ptr - 1 is in fact > ptr + very_big_number. This can result in bogus run-time error when the > objsz checking is turned on. Jakub suggested to not to issue the error > if (ptr >

[PATCH] Fix IFN_OBJECT_SIZE expansion (PR sanitizer/65081)

2015-02-18 Thread Marek Polacek
We're lacking the POINTER_DIFF_EXPR, which means that ptr - 1 is in fact ptr + very_big_number. This can result in bogus run-time error when the objsz checking is turned on. Jakub suggested to not to issue the error if (ptr > ptr + offset) is true. So this patch attemps to do that, along with so