GNU bug report logs - #58096
support malloc NULL return

Previous Next

Package: grep;

Reported by: Aleksandar Kostadinov <akostadinov <at> gmail.com>

Date: Mon, 26 Sep 2022 15:45:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Aleksandar Kostadinov <akostadinov <at> gmail.com>
Subject: bug#58096: closed (Re: bug#58096: support malloc NULL return)
Date: Mon, 26 Sep 2022 18:09:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#58096: support malloc NULL return

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 58096 <at> debbugs.gnu.org.

-- 
58096: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58096
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Aleksandar Kostadinov <akostadinov <at> gmail.com>
Cc: 58096-done <at> debbugs.gnu.org
Subject: Re: bug#58096: support malloc NULL return
Date: Mon, 26 Sep 2022 11:08:40 -0700
On 9/26/22 02:19, Aleksandar Kostadinov wrote:
> Can grep be updated to also support a NULL return value?

No need for an update, as grep has done that for many years.

This is a configuration problem on the part of the memkind user. See:

https://github.com/memkind/memkind/issues/853#issuecomment-1258417795

[Message part 3 (message/rfc822, inline)]
From: Aleksandar Kostadinov <akostadinov <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: support malloc NULL return
Date: Mon, 26 Sep 2022 12:19:19 +0300
[Message part 4 (text/plain, inline)]
Hello,

grep fails when using a certain malloc implementation (memkind) because of
its reliance on malloc returning 0 when zero size is passed to it. Memkind
returns NULL instead which according to authors [1] is one of the
acceptable values in malloc specification.

Can grep be updated to also support a NULL return value?

Thank you!

[1] https://github.com/memkind/memkind/issues/853#issuecomment-1241678167
[Message part 5 (text/html, inline)]

This bug report was last modified 2 years and 241 days ago.

Previous Next


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