This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Initialize strtok_r's saveptr to NULL
- From: Manish Goregaokar <manish at mozilla dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 29 Jun 2016 21:00:23 +0530
- Subject: Re: [PATCH] Initialize strtok_r's saveptr to NULL
- Authentication-results: sourceware.org; auth=none
- References: <CAFOnWknprKQpWy3TU1x7cZZ7n+=nJyw7nhHme9KtLxiv8GasbQ at mail dot gmail dot com> <faa72bac-65a0-ad08-b00c-ae95c2ec44f6 at redhat dot com> <CAFOnWk=WkGWGP9OR8gwnnbMAaRSVMkrgW8ZOSikQ67iG6jpRrg at mail dot gmail dot com> <096d4eba-1f36-1a1c-055e-331353293364 at redhat dot com>
Yipes, sorry about that. Copy-paste error :)
-Manish
On Wed, Jun 29, 2016 at 8:42 PM, Pedro Alves <palves@redhat.com> wrote:
> On 06/29/2016 03:42 PM, Manish Goregaokar wrote:
>> Fixed and pushed.
>
> Thanks. Please don't put the "gdb/ChangeLog:" lines in the
> ChangeLog file though. :-)
>
>>
>> Is this something we can fix in gcc? Pointer overflow is UB IIRC so
>> <nonnullptr>+<positive thing> should never be null. Not sure if the
>> compiler knows that this is positive though.
>
> I'd hope so. Was already working on a minimal reproducer. :-)
> Filed a gcc bug now:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71699
>
> Thanks,
> Pedro Alves
>