GNU bug report logs - #17499
current dfa.c can malloc 0 bytes

Previous Next

Package: grep;

Reported by: Aharon Robbins <arnold <at> skeeve.com>

Date: Thu, 15 May 2014 16:24:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 17499-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Aharon Robbins <arnold <at> skeeve.com>
Cc: 17499-done <at> debbugs.gnu.org
Subject: Re: bug#17499: current dfa.c can malloc 0 bytes
Date: Thu, 15 May 2014 12:44:25 -0700
[Message part 1 (text/plain, inline)]
On 05/15/2014 10:34 AM, Aharon Robbins wrote:
> The wrapper only checks for NULL return.

Ah, thanks, that's the problem then: gawk's xmalloc is pickier than 
grep's, and the extra pickiness is incompatible with what dfa.c 
expects.  I see that gawk's xrealloc is also too picky, but gawk's 
xcalloc is OK.  Attached isa patch to gawk.  As this problem does not 
affect grep I'll close the grep bug.


[0001-Port-to-systems-where-malloc-0-and-or-realloc-P-0-re.patch (text/x-patch, attachment)]

This bug report was last modified 11 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.