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: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#58096: closed (support malloc NULL return)
Date: Mon, 26 Sep 2022 18:09:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 26 Sep 2022 11:08:40 -0700
with message-id <987f3871-7c58-e4c9-d205-1609386d57c0 <at> cs.ucla.edu>
and subject line Re: bug#58096: support malloc NULL return
has caused the debbugs.gnu.org bug report #58096,
regarding support malloc NULL return
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> 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: 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 3 (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 4 (text/html, inline)]
[Message part 5 (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


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.