bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17499: current dfa.c can malloc 0 bytes


From: Paul Eggert
Subject: bug#17499: current dfa.c can malloc 0 bytes
Date: Thu, 15 May 2014 09:48:41 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/15/2014 09:22 AM, Aharon Robbins wrote:
It seems that code in the grep master dfa.c can call xmalloc with
an amount that is zero.  This is OK on GLIBC but is causing some failures
on other systems where malloc(0) fails.

Thanks, I'll try to take a look at this from your recipe. Are there any more details about the failure? What are the symptoms?

A quick look at the dfa.c source code in grep suggests that it can't be a direct call to xmalloc, as those args all must be nonzero. Perhaps it's indirect, via xnmalloc or something like that?

Also, gnulib's xmalloc doesn't mind if malloc (0) returns NULL. Is gawk's xmalloc pickier? If so, why?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]