From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by sourceware.org (Postfix) with ESMTPS id ABBC93858C60 for ; Fri, 27 Aug 2021 16:34:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ABBC93858C60 Received: by mail-qk1-x72a.google.com with SMTP id a10so7731737qka.12 for ; Fri, 27 Aug 2021 09:34:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8Ty4Cbq/V136qxKDn1YbRnxVHWDoIpghStCpqVdFTmE=; b=h3BStTUQ5d91YISaM642Iv4HIPvxKz+xHc/E4QAfT0buSxxTSg4vWj+MWEYytYuboc bw2NzeBDHM4a2AFEI1FAn10K2MzEwivwn0U5YQowVymMDcgAOmmNW8BUjyTgQqe+LOSB t4+/DXjkFJfAPq2gTdFf3TYXCwJBqhO5SjCLZ12HClKRd/8vwcNw+FFK4lF9ObEn3Jl/ NVpk43t9m3Yu3Pta2EaaWyix3jrB+OaFTTttIfhSxfbgGMJPILP9jg3LjiIxg7T2iVCq WC2GlKVTs+WI/OaAQiHXALKdMV7+00G1vIaXC8yfF9NrdgQrJTUlHmXGdmn5tYpL5pXS L+fA== X-Gm-Message-State: AOAM530lldK9Twfs+eB2+p2MIa5zpd/d5+Z2VMYAJo2gU7NBMEjZVJkY dt4L2kLFb0L9XLj+oN7AaiIUdjIE92s= X-Google-Smtp-Source: ABdhPJxJrsWA38/V2D4/4Ne1tCV1XbSbTwp299BI04YtuqlTomBQIJNdVKkB7cxQSa3RpWaoQtuZJA== X-Received: by 2002:a05:620a:28c6:: with SMTP id l6mr10236530qkp.325.1630082073041; Fri, 27 Aug 2021 09:34:33 -0700 (PDT) Received: from [192.168.0.41] (97-118-104-61.hlrn.qwest.net. [97.118.104.61]) by smtp.gmail.com with ESMTPSA id x125sm5047723qkd.8.2021.08.27.09.34.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Aug 2021 09:34:32 -0700 (PDT) Subject: Re: [PATCH v3] remove attribute access from regexec To: Paul Eggert Cc: GNU C Library References: <15a32181-8060-4135-cb72-9e79831697d5@gmail.com> <4251e9f2-d4d1-b649-8e86-a4336164a5b1@cs.ucla.edu> <1024a9e9-a880-7da2-7b99-3e8b8012a94a@cs.ucla.edu> <3e8fa13e-14e4-0e98-18e2-952cf5e9c278@cs.ucla.edu> <7e615633-ef4e-87b7-2808-8042a565911d@gmail.com> <745a8432-57b9-134b-7024-c7ddbe9bc1da@cs.ucla.edu> <21f69be8-e594-97a0-a7fe-2d6d16cd7011@cs.ucla.edu> From: Martin Sebor Message-ID: <9b9247b6-2839-906b-3ed1-acf3651c178f@gmail.com> Date: Fri, 27 Aug 2021 10:34:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <21f69be8-e594-97a0-a7fe-2d6d16cd7011@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2021 16:34:35 -0000 On 8/27/21 2:52 AM, Paul Eggert wrote: > On 8/26/21 9:47 AM, Martin Sebor wrote: >> I think I'd prefer to let you do this. > > OK, proposed glibc patch attached. As I lack the time to shepherd each > regex fix into Glibc separately, I simply copied regex-relevant source > files from Gnulib to Glibc, after merging recent Glibc changes (plus > your proposal) into Gnulib. > > Please give the patch a try. The patch compiles fine with the latest GCC trunk (12.0) but it seems to cause failures in the conformance tests that I don't think were there before: FAIL: conform/POSIX/regex.h/conform FAIL: conform/POSIX2008/regex.h/conform FAIL: conform/UNIX98/regex.h/conform FAIL: conform/XOPEN2K/regex.h/conform FAIL: conform/XOPEN2K8/regex.h/conform FAIL: conform/XPG4/regex.h/conform FAIL: conform/XPG42/regex.h/conform The first one fails because of this (I suspect the others are the same): Namespace violation: "GCC" Namespace violation: "diagnostic" Namespace violation: "ignored" Namespace violation: "pop" Namespace violation: "pragma" Namespace violation: "push" FAIL: Namespace of I'm guessing it's due to a limitation of the conformance test script that considers the GCC diagnostic pragmas unsafe to use because they are in the user-namespace (even though they're not subject to macro expansion). I'm still not sure I understand why the #pragma is needed since -Wvla shouldn't trigger in a system header. Beyond that I only skimmed your patch. It includes quite a few changes that don't seem necessary to avoid the GCC warning (BZ #28170) and that I wouldn't be comfortable making at the same time. This is not an objection, just an explanation why I was reluctant to accept some of your suggestions. But just to clarify, I meant I would have preferred to just fix the Glibc warning and let you change the other Glibc internal APIs and handle the Gnulib integration. Looks like you decided against the former in the end but thanks for taking care of the latter. Martin