Subject: bug#58096: closed (Re: bug#58096: support malloc NULL return)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 26 Sep 2022 18:09:02 +0000

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 [email-masked].

-- 
58096: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58096
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#58096: support malloc NULL return
From: Paul Eggert <[email-masked]>
To: Aleksandar Kostadinov <[email-masked]>
Cc: [email-masked]
Date: Mon, 26 Sep 2022 11:08:40 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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

Subject: support malloc NULL return
From: Aleksandar Kostadinov <[email-masked]>
To: [email-masked]
Date: Mon, 26 Sep 2022 12:19:19 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

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