This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Properly honor no_sanitize_undefined attribute
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 30 Jun 2014 14:58:53 +0200
- Subject: Re: [PATCH] Properly honor no_sanitize_undefined attribute
- Authentication-results: sourceware.org; auth=none
- References: <20140630120826 dot GA20427 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jun 30, 2014 at 02:08:26PM +0200, Marek Polacek wrote:
> Apparently I didn't pay much attention to no_sanitize_undefined
> attribute when adding new features to ubsan, so we would instrument
> stuff even though the function is marked with this attribute.
> Thus fixed & new testcases added.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2014-06-30 Marek Polacek <polacek@redhat.com>
>
> * convert.c (convert_to_integer): Don't instrument conversions if the
> function has no_sanitize_undefined attribute.
> * ubsan.c: Don't run the ubsan pass if the function has
> no_sanitize_undefined attribute.
> c/
> * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
> has no_sanitize_undefined attribute.
> cp/
> * cp-gimplify.c (cp_genericize): Don't instrument returns if the
> function has no_sanitize_undefined attribute.
> * decl.c (compute_array_index_type): Don't instrument VLAs if the
> function has no_sanitize_undefined attribute.
> testsuite/
> * c-c++-common/ubsan/attrib-2.c: New test.
> * g++.dg/ubsan/return-3.C: New test.
Ok, thanks.
Jakub