This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Introduce TYPE_OVERFLOW_SANITIZED
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 13 Nov 2014 11:18:12 +0100
- Subject: Re: [PATCH] Introduce TYPE_OVERFLOW_SANITIZED
- Authentication-results: sourceware.org; auth=none
- References: <20141112175500 dot GN29791 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1411130943510 dot 374 at zhemvz dot fhfr dot qr> <20141113101141 dot GQ29791 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Nov 13, 2014 at 11:11:41AM +0100, Marek Polacek wrote:
> On Thu, Nov 13, 2014 at 09:45:50AM +0100, Richard Biener wrote:
> > Hmm, I'd have expected to test !TYPE_OVERFLOW_SANITIZED (),
> > that is, have the predicate inverted. At least that's how
> > I understand the name - an overflow is to be preserved for
> > sanitization.
>
> I guess that macro name is a little bit baffling ;).
>
> > So - can you invert the predicates (and uses)? In the
> > sanitizer you then can guard instrumentations with
> > TYPE_OVERFLOW_SANITIZED.
>
> Done.
>
> > Ok with that change.
>
> Thanks, this is the inverted version:
>
> 2014-11-13 Marek Polacek <polacek@redhat.com>
>
> * tree.h (TYPE_OVERFLOW_SANITIZED): Define.
> * fold-const.c (fold_binary_loc): Use it.
> * match.pd: Likewise.
That looks good.
Jakub