[PATCH] Initialize strtok_r's saveptr to NULL
Pedro Alves
palves@redhat.com
Wed Jun 29 15:12:00 GMT 2016
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
More information about the Gdb-patches
mailing list