From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 249931F4B4 for ; Sat, 9 Jan 2021 03:54:51 +0000 (UTC) Received: from localhost ([::1]:53182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ky5Kz-0004M7-KC for normalperson@yhbt.net; Fri, 08 Jan 2021 22:54:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ky5Kw-0004Ly-Q4 for bug-gnulib@gnu.org; Fri, 08 Jan 2021 22:54:46 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ky5Ku-00089d-8V; Fri, 08 Jan 2021 22:54:46 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DF3C01600F1; Fri, 8 Jan 2021 19:54:40 -0800 (PST) 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 G5sBQcZOKxfp; Fri, 8 Jan 2021 19:54:39 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A7CF4160133; Fri, 8 Jan 2021 19:54:39 -0800 (PST) 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 DpUw19vd0hJ5; Fri, 8 Jan 2021 19:54:39 -0800 (PST) Received: from [192.168.1.9] (cpe-23-243-218-95.socal.res.rr.com [23.243.218.95]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 727251600CD; Fri, 8 Jan 2021 19:54:39 -0800 (PST) Subject: Re: [PATCH 1/3] posix: Remove alloca usage on regex set_regs To: Darshit Shah References: <20210106181707.1738066-1-adhemerval.zanella@linaro.org> <4cfd0cb6-37b2-e7df-ec41-d175f62d963d@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <8e5d8de1-f70d-9a15-c6a0-04584ab63644@cs.ucla.edu> Date: Fri, 8 Jan 2021 19:54:39 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <4cfd0cb6-37b2-e7df-ec41-d175f62d963d@gnu.org> Content-Type: multipart/mixed; boundary="------------83B1B67B65E9B8321D6E386C" Content-Language: en-US Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.241, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org, libc-alpha@sourceware.org, Adhemerval Zanella Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is a multi-part message in MIME format. --------------83B1B67B65E9B8321D6E386C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 1/8/21 5:24 PM, Darshit Shah wrote: > /home/rincewind/Programming/wget/lib/regexec.c:1444: undefined reference > to `regmatch_list_free' Oof, it's because Gnulib's replacement of 'free' with 'rpl_free' caused the function definition to be named 'regmatch_list_rpl_free'. Thanks for reporting it. I installed the attached hack into Gnulib to work around the problem. This should work with glibc as well. --------------83B1B67B65E9B8321D6E386C Content-Type: text/x-patch; charset=UTF-8; name="0001-dynarray-work-even-if-free-is-replaced.patch" Content-Disposition: attachment; filename="0001-dynarray-work-even-if-free-is-replaced.patch" Content-Transfer-Encoding: quoted-printable >From 1b50e7d4d63fee04dbe06d4a58f3061c569fede8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 8 Jan 2021 19:50:16 -0800 Subject: [PATCH] =3D?UTF-8?q?dynarray:=3D20work=3D20even=3D20if=3D20=3DE2= =3D80=3D98free?=3D =3D?UTF-8?q?=3DE2=3D80=3D99=3D20is=3D20replaced?=3D MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Problem reported by Darshit Shah in: https://lists.gnu.org/r/bug-gnulib/2021-01/msg00140.html * lib/malloc/dynarray-skeleton.c (DYNARRAY_FREE): New macro. Use it everywhere instead of DYNARRAY_NAME (free). --- ChangeLog | 6 ++++++ lib/malloc/dynarray-skeleton.c | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b76330e5b..1e589aac3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2021-01-08 Paul Eggert =20 + dynarray: work even if =E2=80=98free=E2=80=99 is replaced + Problem reported by Darshit Shah in: + https://lists.gnu.org/r/bug-gnulib/2021-01/msg00140.html + * lib/malloc/dynarray-skeleton.c (DYNARRAY_FREE): New macro. + Use it everywhere instead of DYNARRAY_NAME (free). + tempname: don=E2=80=99t block for minutes Derived from a patch proposed by Adhemerval Zanella in: https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html diff --git a/lib/malloc/dynarray-skeleton.c b/lib/malloc/dynarray-skeleto= n.c index fe886102c..5b9f37bdd 100644 --- a/lib/malloc/dynarray-skeleton.c +++ b/lib/malloc/dynarray-skeleton.c @@ -150,6 +150,10 @@ struct DYNARRAY_STRUCT #define DYNARRAY_CONCAT1(prefix, name) DYNARRAY_CONCAT0(prefix, name) #define DYNARRAY_NAME(name) DYNARRAY_CONCAT1(DYNARRAY_PREFIX, name) =20 +/* Use DYNARRAY_FREE instead of DYNARRAY_NAME (free), + so that Gnulib does not change 'free' to 'rpl_free'. */ +#define DYNARRAY_FREE DYNARRAY_CONCAT1 (DYNARRAY_NAME (f), ree) + /* Address of the scratch buffer if any. */ #if DYNARRAY_HAVE_SCRATCH # define DYNARRAY_SCRATCH(list) (list)->scratch @@ -200,7 +204,7 @@ DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) /* Deallocate the dynamic array and its elements. */ __attribute_maybe_unused__ __nonnull ((1)) static void -DYNARRAY_NAME (free) (struct DYNARRAY_STRUCT *list) +DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) { DYNARRAY_NAME (free__elements__) (list->u.dynarray_header.array, list->u.dynarray_header.used); @@ -466,7 +470,7 @@ DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *lis= t, else { /* On error, we need to free all data. */ - DYNARRAY_NAME (free) (list); + DYNARRAY_FREE (list); errno =3D ENOMEM; return false; } @@ -497,7 +501,7 @@ DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *lis= t, size_t *lengthp) else { /* On error, we need to free all data. */ - DYNARRAY_NAME (free) (list); + DYNARRAY_FREE (list); errno =3D ENOMEM; return NULL; } --=20 2.27.0 --------------83B1B67B65E9B8321D6E386C--