From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 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 EEE571F47C for ; Tue, 3 Jan 2023 02:43:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCXH4-0006la-4F; Mon, 02 Jan 2023 21:43:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCXH2-0006lH-Qn; Mon, 02 Jan 2023 21:43:32 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183] helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pCXH0-0000e2-Oc; Mon, 02 Jan 2023 21:43:32 -0500 Content-Type: multipart/signed; boundary="Apple-Mail=_436AB2D1-F5FE-4238-9EB0-E274C9EE048C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: Clang-built Gawk 5.2.1 regex oddity From: Sam James In-Reply-To: Date: Tue, 3 Jan 2023 02:43:14 +0000 Cc: arnold@skeeve.com, Gnulib bugs , concord@gentoo.org, bug-gawk@gnu.org Message-Id: <928FEE7D-2F32-4952-A6F8-681BBE8DA914@gentoo.org> References: <20221230000119.hyui6umnspuyzqum@bubbles> <202212300913.2BU9DV6V030160@freefriends.org> <6DADB0FC-87EE-4028-91DF-C93A968A8982@gentoo.org> <202301011906.301J6ROQ018104@freefriends.org> <1cdb3d41-d675-cca1-7498-c3840f2ee8ad@cs.ucla.edu> To: Paul Eggert X-Mailer: Apple Mail (2.3731.300.101.1.3) Received-SPF: pass client-ip=140.211.166.183; envelope-from=sam@gentoo.org; helo=smtp.gentoo.org X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org --Apple-Mail=_436AB2D1-F5FE-4238-9EB0-E274C9EE048C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 3 Jan 2023, at 02:14, Sam James wrote: >=20 >=20 >=20 >> On 2 Jan 2023, at 06:10, Paul Eggert wrote: >>=20 >> This is a serious bug in Clang: it generates incorrect machine code. >>=20 >> [snip] >>=20 >> My guess is that Clang got confused because dfaerror is declared = _Noreturn, so Clang mistakenly assumed that dfawarn is also _Noreturn, = which it is not. >>=20 >> I worked around the Clang bug by installed the attached patch into = Gnulib. Please give it a try with Gawk. >=20 > Confirmed this mitigates the problem. I had to apply it manually to = support/ as I couldn't immediately see how to sync gnulib myself, but = that's no big deal. >=20 >>=20 >> Incorrect code generation is a serious bug in Clang; can you please = report it to the Clang folks? I am considering using a bigger hammer, = and doing this: >>=20 >=20 > Kenton's done this at = https://github.com/llvm/llvm-project/issues/59792 now. >=20 >> #define _Noreturn /*empty*/ >>=20 >> whenever Clang is used, until the bug is fixed. >>=20 >=20 > maskray's analysis so far at = https://github.com/llvm/llvm-project/issues/59792#issuecomment-1369314436 = agrees with yours, which would mean > this is likely a good idea. >=20 By the way, when I ran gnulib's test suite following = https://sourceware.org/glibc/wiki/Testing/Gnulib, I didn't get any = failures with Clang. I was expecting to get one (before your commit) for DFA. Maybe we should shoehorn a similar ternary expression into = tests/test-dfa-match-aux.c so we're guaranteed a test failure with bad compilers if someone uses the DFA module? --Apple-Mail=_436AB2D1-F5FE-4238-9EB0-E274C9EE048C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY7OWQl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kFEIAP4kwx4OhSvv5wnVpRu+NUcsFroMaATOee/qgR8EucA+cwD/TIIESwSXFBsT f51ovE/Yd3tGWQi+EdWCN4mFvxzH+gA= =xFo0 -----END PGP SIGNATURE----- --Apple-Mail=_436AB2D1-F5FE-4238-9EB0-E274C9EE048C--