From unknown Mon Jun 23 04:11:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58096 <58096@debbugs.gnu.org> To: bug#58096 <58096@debbugs.gnu.org> Subject: Status: support malloc NULL return Reply-To: bug#58096 <58096@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:11:21 +0000 retitle 58096 support malloc NULL return reassign 58096 grep submitter 58096 Aleksandar Kostadinov severity 58096 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 26 11:44:25 2022 Received: (at submit) by debbugs.gnu.org; 26 Sep 2022 15:44:25 +0000 Received: from localhost ([127.0.0.1]:51406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocqHR-0003UC-Bn for submit@debbugs.gnu.org; Mon, 26 Sep 2022 11:44:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:34178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ockH1-0002lL-Ff for submit@debbugs.gnu.org; Mon, 26 Sep 2022 05:19:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ockH1-0007gB-9n for bug-grep@gnu.org; Mon, 26 Sep 2022 05:19:35 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:44981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ockGz-0006iT-KL for bug-grep@gnu.org; Mon, 26 Sep 2022 05:19:35 -0400 Received: by mail-wm1-x333.google.com with SMTP id k3-20020a05600c1c8300b003b4fa1a85f8so3352638wms.3 for ; Mon, 26 Sep 2022 02:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=A904Yjx/5h//eaxfWmSXB6H+Uq7ERIkRh9rMrMzA12w=; b=H3XxF6RK6lTgi/5yzKoQUX75UIEtrASmPPxU7nJLUwMiyK66B2Sv82pabSEd2TaSQo oK5EBKgJRG7hXasHIRO8wWY3HY5aE1V1/Pcdj638a9aLdrdsAZUPsqoWvuOFclIAvDxa a8+buC7QBdG5gAU4KjWBEmZV5Id3KxmUy52rQLGfCetFU85P5f1/JZ6glsSDbxX7Og9I EV6/bhDM4x36/TW23L7G3ODlv4/e+WQjPJvYq4wMG7vkJtnrnWRf8snXPVPI6YQv/n/F SrLx88NcgBc3jy6/4qIA2DJ8lK5S1FIU5/U7TqmaQhRJExOupNJZA9ZlIGRLnF0w3f5M 8c1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=A904Yjx/5h//eaxfWmSXB6H+Uq7ERIkRh9rMrMzA12w=; b=vV1en+oJxsRHNJG1Xw4x2eF4C1MT6IumssCuNdj5xStqRl+QF3W8fZc5rGPczUKyr9 GrkCfDickVGpS7JZvxLylO6ydQKql5aqcim2sm8uUNB89syQN8uqU/AquzxashM72hcr blbzumejXsEPVCt/054MVn4fYXI6XQUqMnCL4lTTdiCSBY1l66L7u5CHPHJ8sc7xE4RC 9dMvdRPou8FL0orRUGRadAVIsrsQACo+SIRFvs23qpI1wwS0CRrKN5oM63weugePRubb 0z/gQAecuwmvtG1GcyKS6VTCktBMRNKbid2q8mnzkcC1LWsPnn3aspUH3WvRahMnio22 d00Q== X-Gm-Message-State: ACrzQf0869IW7IsPTJH2LSF0aEeq0lNvdT+pr9Qk2ywKRqD2eQBkl3oD CyTPVS+pE7uTrs++dG0fLiL3oBV92PvOygcBYWuD4+h500U= X-Google-Smtp-Source: AMsMyM54b1F84252MvlS2rSgWYpmVk2wr55/JwUKbOiWHVE4JAFQX6GechgNXC2nVdU2v4bjMiHqnnnuZqRFqMykI6U= X-Received: by 2002:a05:600c:4f45:b0:3b4:9c9a:7077 with SMTP id m5-20020a05600c4f4500b003b49c9a7077mr14639237wmq.109.1664183971081; Mon, 26 Sep 2022 02:19:31 -0700 (PDT) MIME-Version: 1.0 From: Aleksandar Kostadinov Date: Mon, 26 Sep 2022 12:19:19 +0300 Message-ID: Subject: support malloc NULL return To: bug-grep@gnu.org Content-Type: multipart/alternative; boundary="0000000000006ff26505e9910667" Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=akostadinov@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 26 Sep 2022 11:44:24 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --0000000000006ff26505e9910667 Content-Type: text/plain; charset="UTF-8" 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 --0000000000006ff26505e9910667 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

grep fails when using= a certain malloc implementation (memkind) because of its reliance on mallo= c 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 sp= ecification.

Can grep be updated to also support a NULL r= eturn value?

Thank you!

--0000000000006ff26505e9910667-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 26 14:08:51 2022 Received: (at 58096-done) by debbugs.gnu.org; 26 Sep 2022 18:08:51 +0000 Received: from localhost ([127.0.0.1]:51718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocsXD-0003Hd-He for submit@debbugs.gnu.org; Mon, 26 Sep 2022 14:08:51 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocsXB-0003HK-8I for 58096-done@debbugs.gnu.org; Mon, 26 Sep 2022 14:08:50 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 152E0160052; Mon, 26 Sep 2022 11:08:42 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id CB2ysFusvhtm; Mon, 26 Sep 2022 11:08:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 40A1C16009F; Mon, 26 Sep 2022 11:08:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu 40A1C16009F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1664215721; bh=jHA+slLUjsf76ZfSLmN/6OfBi3WljaKmDsfdcn7kFUY=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type: Content-Transfer-Encoding; b=owcZE8l8W/y5NjQj+TAFD0XTmlRefl32wl+R9F9GhijzGMYsCzz9d597G1RViUaay 4UpZuCHIoIFKDxTh/TB3xq3m1eFIU4YXXMBKX7DcdrvAV0hEUhFNzxi1qgy1ldhASl M3F/ikfevRFbgIZk88Ed0bomZ8BmPsKxFb5HDSSA= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CRgqG8cwGInD; Mon, 26 Sep 2022 11:08:41 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 16860160052; Mon, 26 Sep 2022 11:08:41 -0700 (PDT) Message-ID: <987f3871-7c58-e4c9-d205-1609386d57c0@cs.ucla.edu> Date: Mon, 26 Sep 2022 11:08:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: bug#58096: support malloc NULL return Content-Language: en-US To: Aleksandar Kostadinov References: From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: 58096-done Cc: 58096-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) 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 From unknown Mon Jun 23 04:11:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 25 Oct 2022 11:24:17 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator