This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix for invalid sanitization of trailing byte in __builtin_strlen
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Maxim Ostapenko <m dot ostapenko at partner dot samsung dot com>
- Cc: Yuri Gribov <tetra2005 at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Slava Garbuzov <v dot garbuzov at samsung dot com>
- Date: Fri, 20 Jun 2014 14:59:14 +0200
- Subject: Re: [PATCH] Fix for invalid sanitization of trailing byte in __builtin_strlen
- Authentication-results: sourceware.org; auth=none
- References: <53A411A8 dot 3000907 at partner dot samsung dot com> <20140620105759 dot GY31640 at tucnak dot redhat dot com> <CAJOtW+4r_=zDuXjZ3yf+GQwkeusGLdmaZMs5bP3KOvGocT6ObA at mail dot gmail dot com> <53A42F4F dot 6080508 at partner dot samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jun 20, 2014 at 04:55:43PM +0400, Maxim Ostapenko wrote:
> > What about bootstrap though?
>
> Bootstrap in progress.
>
> >> +__SIZE_TYPE__ strlen (const char *p) {
> >> + /* Simulate error */
> >> + if (p == a)
> >> + return 1;
>
> > Why this? Can't you instead just use __attribute__((no_sanitize_address,
> noinline))
> > on it instead?
>
> Done.
>
> Ok to commit if bootstrap will succeed?
Ok, thanks.
Jakub