From patchwork Fri Aug 2 13:22:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 95202 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D9666385C6C8 for ; Fri, 2 Aug 2024 13:22:39 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 551413858D20 for ; Fri, 2 Aug 2024 13:22:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 551413858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 551413858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722604935; cv=none; b=KBQkX0/dgs3ye+HU/Cf8jPjmxZrTbj9mrpfajRate0N6LX+QEalUFhTHW3zugDwV5p2lJOf+NO3NQNO9KNp8DrG7hNMwv2qFnwOUaxhJ7uzQmQZAPZS6z8vz8zKOETq1WDjwJoQfBdCcZnqoYSK7vzQGKC0zr5vYqP9Ei7W92xo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722604935; c=relaxed/simple; bh=SNLETudFbWC0UET2Gz762RUmh998eH4VcUiLPU1EkfY=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=OgRI5PDnjRJWQ4ypVIZYjCq0CMBOgpCoVyz/SYc7lERbDdkg7VCIZBJXDYtNxC4LV8O9v7N6lOcAKOzIoSfVfFV5fNVpqHmus3Mz+8W81SKPnr2i1ojZxov62okC3VdQfgz/JN3vfD6tJs20/aQEq3RLRd4v4pNCNt3ub0FAUes= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722604934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qSMbvcWNcxG3iD67J6GXZh5Ihvo1Btcz8A+kfWcmmlk=; b=ceunL20liwCr/Ru82dMRXl/xVK767ORJy903xLJPGEBWoR1VFEIX/Y/qvIUX3GhCrmDBdB RfToYZvkHKqykWeZ8J/LgQblFNNCGUSJ10NK3gCtNFKtYhYKb5D8Cf6WU2Vw/CfGAw6lGm Vewq4Jv76M08qTI6D0+iahcDYCaapQc= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-156-SwthmBxnPe6UTOXNYx_4lA-1; Fri, 02 Aug 2024 09:22:12 -0400 X-MC-Unique: SwthmBxnPe6UTOXNYx_4lA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EA0351955D55 for ; Fri, 2 Aug 2024 13:22:11 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.45.224.139]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E759819560AE for ; Fri, 2 Aug 2024 13:22:10 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 1/4] x86: Add missing switch/case fall-through markers to init_cpu_features In-Reply-To: Message-ID: <6604c632eeb87200dc58d36086bdd044b69e11f3.1722604821.git.fweimer@redhat.com> References: X-From-Line: 6604c632eeb87200dc58d36086bdd044b69e11f3 Mon Sep 17 00:00:00 2001 Date: Fri, 02 Aug 2024 15:22:07 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org The commits introducing these fall-throughs intended them to happen. --- sysdeps/x86/cpu-features.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index c096dd390a..18ed008040 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -879,6 +879,7 @@ init_cpu_features (struct cpu_features *cpu_features) non-temporal on all Skylake servers. */ cpu_features->preferred[index_arch_Avoid_Non_Temporal_Memset] |= bit_arch_Avoid_Non_Temporal_Memset; + /* fallthrough */ case INTEL_BIGCORE_COMETLAKE: case INTEL_BIGCORE_SKYLAKE: case INTEL_BIGCORE_KABYLAKE: @@ -1073,6 +1074,7 @@ https://www.intel.com/content/www/us/en/support/articles/000059422/processors.ht /* Yongfeng and Shijidadao mircoarch tuning. */ case 0x5b: cpu_features->cachesize_non_temporal_divisor = 2; + /* fallthrough */ case 0x6b: cpu_features->preferred[index_arch_AVX_Fast_Unaligned_Load] &= ~bit_arch_AVX_Fast_Unaligned_Load; From patchwork Fri Aug 2 13:22:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 95203 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D5A353858428 for ; Fri, 2 Aug 2024 13:22:44 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 01C96385C6C3 for ; Fri, 2 Aug 2024 13:22:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01C96385C6C3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 01C96385C6C3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722604942; cv=none; b=RbgLiJhGB052Li+xre/DzFUFHYrwL7h0O/XA9cek+u5dZeewjjanYD8Z6GDhVMLHN8gPUusNzvT7Ot6F60mIU+pGZKuA65djy68Uop3SmBBD2xm3IQz629JvIknswnv7MSEFCPqDlM8lnWDiiS0n2yeKHZtfAdngJ8FOy0UKOuo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722604942; c=relaxed/simple; bh=p5AvxEbqbLA76dY2jiwjOUC4Isy8CAeqKsvqHXXl1vE=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=P33R/GmnccI3k959Pjid3hPuYX8h7QvIg/oB+JJ4EPDB/n8fWVWeLOi7jIbhNnfqE/fKxj2S6XBEXq0HaT96jrwSUfSH/QSNT914jLNFfgOCHUyjYhWHtPq5CE0zKbJm65LrPaQF/ohhAR2TF2t7QK/e2icFGS2jwivTiKcCPAc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722604940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qmc6m/oRL7I3+OLhFuATeBldsJRBNw0jxwxsg7LqEps=; b=CD9wc28GH99iWKguvem1xPEDX2zIyX55U3BA2PvTkIZTtI1ugpoTeFNTAzVR5aBiXS4vvC bpUEERwAwQB2t90lc6wQa5tTrTrqEr0PgaELBlyODG7ZHXAv18D4SH9Q3k+ToUX5zmy1X9 JnVhyaakfiFuPvl9Lhm5UucNOW7qGzA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-639-wEVvVQMLN8exwcC1hFVQxQ-1; Fri, 02 Aug 2024 09:22:19 -0400 X-MC-Unique: wEVvVQMLN8exwcC1hFVQxQ-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AD4171955F2D for ; Fri, 2 Aug 2024 13:22:18 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.45.224.139]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B50FA1955E8C for ; Fri, 2 Aug 2024 13:22:17 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 2/4] x86: Tunables may incorrectly set Prefer_PMINUB_for_stringop (bug 32047) In-Reply-To: Message-ID: <6eeff7e8394a40ece76dc9387158b1de20ac1c1b.1722604821.git.fweimer@redhat.com> References: X-From-Line: 6eeff7e8394a40ece76dc9387158b1de20ac1c1b Mon Sep 17 00:00:00 2001 Date: Fri, 02 Aug 2024 15:22:14 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Fixes commit 5bcf6265f215326d14dfacdce8532792c2c7f8f8 ("x86: Disable non-temporal memset on Skylake Server"). --- sysdeps/x86/cpu-tunables.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c index ae9dcd6180..ccc6b64dc2 100644 --- a/sysdeps/x86/cpu-tunables.c +++ b/sysdeps/x86/cpu-tunables.c @@ -248,6 +248,7 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp) CHECK_GLIBC_IFUNC_PREFERRED_BOTH (n, cpu_features, Avoid_Non_Temporal_Memset, 25); } + break; case 26: { CHECK_GLIBC_IFUNC_PREFERRED_NEED_BOTH From patchwork Fri Aug 2 13:22:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 95205 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D3DB3858D35 for ; Fri, 2 Aug 2024 13:23:38 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id D0709385B50B for ; Fri, 2 Aug 2024 13:22:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0709385B50B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D0709385B50B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722604951; cv=none; b=Y86Gmc19fVl8yzFBw7Pv8kxVuXM/bUChpmgUHBcQwYmWJBCOAtqXnwDGKL4f4cJaBUr+JQSGOWvoqgM5caIIzKwkuw6IJ8HLx3f96bxkNUIUmRkuOUeQze4IZBAGFaAM/3UDhJ41f4zKVyQOFCAuDaiT7IoVpborPVQZMbMebBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722604951; c=relaxed/simple; bh=WlflBsFpRnPUOR1RP5H2GVU1GCeRAmT2QIQP0O+5Jq4=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=VONBLempsvlqNwhmtgbEYu1OiqWTf3phqyK6wEc/g7hFJ9vpS71u9f/1cXML/4+sb2xi0HM9TqtlvPcSo2knX8OJdMjfZfd0nQ1yXE4GFKSSGU9p4GQa5QGEVFhSzQh/2A7Qdiwx4cVL76QVmsOe9fTsDN9XOlcoQdFE0OZM2jw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722604948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tyJplB8Bu2A1eStLvppwZTyEb6hm1xASM++IsctYyj4=; b=ecXcLitfVht/4HemeEeSfcH+X8dcms3qXzoiPhDE8A8bDZHGy+eptEajfINDzJD0xHxsOL aop3ywmSyXCc8TXKhnVbbXA4XYLjMGNVp5RspL9HWauU/I4/c3HvEHubUQYoasfW79OVi6 VbzPZIalD5q7EBV7+3MmlbkaE02srkM= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-631-DV9eGMgqMJ2Npel9uo6b9A-1; Fri, 02 Aug 2024 09:22:27 -0400 X-MC-Unique: DV9eGMgqMJ2Npel9uo6b9A-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 894151955F45 for ; Fri, 2 Aug 2024 13:22:26 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.45.224.139]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5EA423000198 for ; Fri, 2 Aug 2024 13:22:25 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 3/4] nss: Fix incorrect switch fall-through in tst-nss-gai-actions In-Reply-To: Message-ID: <8f5c9665df60b69a45673bb22309f597ec4eb719.1722604821.git.fweimer@redhat.com> References: X-From-Line: 8f5c9665df60b69a45673bb22309f597ec4eb719 Mon Sep 17 00:00:00 2001 Date: Fri, 02 Aug 2024 15:22:22 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org This only happened on test failure. --- nss/tst-nss-gai-actions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nss/tst-nss-gai-actions.c b/nss/tst-nss-gai-actions.c index efca6cd183..e42bbd6cae 100644 --- a/nss/tst-nss-gai-actions.c +++ b/nss/tst-nss-gai-actions.c @@ -92,6 +92,7 @@ do_one_test (int action, int family, bool canon) printf ("merge unexpectedly succeeded:\n %s\n", formatted); support_record_failure (); free (formatted); + break; } else return; From patchwork Fri Aug 2 13:22:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 95204 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 757703858C78 for ; Fri, 2 Aug 2024 13:23:17 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id E3190385C6D1 for ; Fri, 2 Aug 2024 13:22:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3190385C6D1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E3190385C6D1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722604968; cv=none; b=Y4/kHuNBH1QROOI/zR0Ola8XLCMQNWWf48HsAS7oIvt7pdtRVvCqDkJ9NQm0NvaeE8p5GEJCumrOPHNNuCZlD4wH6/F9UZXCrPPhMN4p0A7RicZoRrM0zoK2ya1PXQBFdDXf5H4mMRvxBPUxpdfNYkhzbC6l02k0564jn+XeRX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722604968; c=relaxed/simple; bh=Ymb4QYVTNpIg4EwfcHnz3r17ZcKXJrCecCnyKQJX4Uc=; h=DKIM-Signature:From:To:MIME-Version:Subject:Message-ID:Date; b=VmQ4fZOOthknE6INshkp3HRcK4D4WEqwYtpVLnLoImIcUIy1HCziUbk/Rba2aUvBIWz4b86+WVCyq9sErPQtPqj8laqDO7frx/fMc3VyIyyVkuDehwhpAz/pyMjLoKwfkmBP99y28YQubsHNknPjt0tVY2LXwtQVpCzVv9FFWks= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722604966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YNhctE4x5zxNLuDO9g56SZpxsf1qNDeTn5qx9Oa0rW4=; b=LzbtX67WGuOVj9GTyWd3TBJZqnBos9GXmffvPBKRFice43H+dLZEQU7JTAlWZ4cfeKm/Fo 1bxY+Fl1ua+rsAQJLqHEHib67AbBubohwKctraV4EMmehAa7uKUotbG6XkiQRyzzSTVc04 2fx1O/577dXl/jUKf7wjm4jbjQFfNRk= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-456-zHrTfYEvN4CgPpG0Y1bCmw-1; Fri, 02 Aug 2024 09:22:45 -0400 X-MC-Unique: zHrTfYEvN4CgPpG0Y1bCmw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 60E871955D55 for ; Fri, 2 Aug 2024 13:22:44 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.45.224.139]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3C21D1955D4A for ; Fri, 2 Aug 2024 13:22:42 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org MIME-Version: 1.0 Subject: [PATCH 4/4] Turn on -Wimplicit-fallthrough by default if available In-Reply-To: Message-ID: <2a5b17ba992abd2311da130c18a531f89c21ee79.1722604821.git.fweimer@redhat.com> References: X-From-Line: 2a5b17ba992abd2311da130c18a531f89c21ee79 Mon Sep 17 00:00:00 2001 Date: Fri, 02 Aug 2024 15:22:40 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org --- Makeconfig | 3 +++ config.make.in | 1 + configure | 12 ++++++++++++ configure.ac | 10 ++++++++++ 4 files changed, 26 insertions(+) diff --git a/Makeconfig b/Makeconfig index 2d4343b604..e90f612b96 100644 --- a/Makeconfig +++ b/Makeconfig @@ -889,6 +889,9 @@ endif # Extra flags to pass to GCC. +gccwarn := -Wall -Wwrite-strings -Wundef +ifeq ($(enable-wimplicit-fallthrough),yes) ++gccwarn += -Wimplicit-fallthrough +endif ifeq ($(enable-werror),yes) +gccwarn += -Werror endif diff --git a/config.make.in b/config.make.in index 36096881b7..4286a63269 100644 --- a/config.make.in +++ b/config.make.in @@ -51,6 +51,7 @@ c++-cstdlib-header = @CXX_CSTDLIB_HEADER@ c++-cmath-header = @CXX_CMATH_HEADER@ c++-bits-std_abs-h = @CXX_BITS_STD_ABS_H@ enable-werror = @enable_werror@ +enable-wimplicit-fallthrough = @enable_wimplicit_fallthrough@ have-z-execstack = @libc_cv_z_execstack@ have-protected-data = @libc_cv_protected_data@ diff --git a/configure b/configure index 1d543548cd..01a011d73f 100755 --- a/configure +++ b/configure @@ -643,6 +643,7 @@ have_selinux have_libcap have_libaudit LIBGD +enable_wimplicit_fallthrough libc_cv_cc_loop_to_function libc_cv_cc_submachine libc_cv_cc_nofma @@ -7465,6 +7466,17 @@ if test $libc_cv_cc_loop_to_function = yes; then fi +if ${CC-cc} --help=warnings 2>&1 | grep -q " -Wimplicit-fallthrough" \ + || ${CC-cc} -print-diagnostic-options 2>&1 | grep -q " -Wimplicit-fallthrough" +then + echo HOHOHO + enable_wimplicit_fallthrough=yes +else + echo BADBADBAD + enable_wimplicit_fallthrough=no +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5 printf %s "checking for libgd... " >&6; } if test "$with_gd" != "no"; then diff --git a/configure.ac b/configure.ac index 9cbc0bf68f..c686ea4b97 100644 --- a/configure.ac +++ b/configure.ac @@ -1468,6 +1468,16 @@ if test $libc_cv_cc_loop_to_function = yes; then fi AC_SUBST(libc_cv_cc_loop_to_function) +dnl GCC uses --help=warnings, Clang uses -print-diagnostic-options. +if ${CC-cc} --help=warnings 2>&1 | grep -q " -Wimplicit-fallthrough" \ + || ${CC-cc} -print-diagnostic-options 2>&1 | grep -q " -Wimplicit-fallthrough" +then + enable_wimplicit_fallthrough=yes +else + enable_wimplicit_fallthrough=no +fi +AC_SUBST(enable_wimplicit_fallthrough) + dnl Check whether we have the gd library available. AC_MSG_CHECKING(for libgd) if test "$with_gd" != "no"; then