From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 97B833858CDA for ; Tue, 9 Apr 2024 04:03:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 97B833858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 97B833858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712635390; cv=none; b=O7niCmpRDhZ8N+oT0rnSbiMD/BpYAMlE/HVPvGA7S3zQrVw6abOAYekwrgawDc7LNdK/6KtaYQ7DxlC+uP0TlIh7xTMhWsiAlIR0m9WX/P0UeNzgAo7DWKJTjKesfnqACNDCflX9rlQab9w9nZFUmC2bKPLj8DkeWC9F0rCpZ7s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712635390; c=relaxed/simple; bh=L5TAHc/70qZc+EjUrS1nAnwoSkAMIoG8Lxv45maRi7E=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=XawmWZQEh1RsMvTpxsefypOTjQOFA4fUpxHwT5z0R7TpnR6o4vpCh37Eqnc/aSzUy7svBpumqHSxbsqzzzbfrcEzwLKFmCz1nOqSwGorFDHBJtaGtJLxAfrtH2o4IxNqq7e1FH3jiG7KfmPqpezKLD6lOgsO85A8OxW/bWn96bc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1e3c7549078so21332715ad.0 for ; Mon, 08 Apr 2024 21:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712635386; x=1713240186; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fG3DvVuwNVnaz7dYqwc/w3RcpJfx7IaoBUawXE06KQs=; b=kqz331Rfy+VpJH2DEActaPcflXly57KWlwU56rc0MEwChEaxli3foEoTSRkd5gHJ62 UUz89cC2Y/8atNSMyV5c06JtjMkElXrd8M2Ns7M7Haf2QMRQq448iEJTU60miy9ISVUq f3nyLDRb4+ATa14+R8FKMeZV4qZstOnWLPdgWhSdfM4vAT+wQZvcU8GPyHWrBz1TFV7t F0m/DNTTc59KWqK4pd1gEY/coy/qkardSlMw4IlXbLM8cKxDcz1aK9eHluI9CDBt+oqO lxHVPLoQxoW3ukEZUiraAzrnlnjw+ntJcBKDy3+BlH3LXQDVqJ0POH5mnJ1xkHGIMtvV iMCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712635386; x=1713240186; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fG3DvVuwNVnaz7dYqwc/w3RcpJfx7IaoBUawXE06KQs=; b=lZ7cL7UtYGorlsyM+OCCTRaB1rTLnyBYXMJm+EWmt3h79VNbjILd8RUtd/vMYj7dLr nAP/7Hmy3rGsNDjS29GHDbZBb4wJPvHd8chx0gxNI2I7A/zzAXIE/BuZS7qPATYqiAum uKNwlF+iZOlAa2a3rb/AjAI3TDNN/vcyEIQVqoz8T/yphs8F+Nr9Uq/IQbR9IAWdvYNX NnyafmNuC957ubjXrDbJaM+CCuASF1g5DKUGUFCd4CSzv/v8QgzTHvBa1UbeyJS8PYH1 fZZ4ohL/JT34hAWiYWmmYjIizkuH7zD+uaPXfidtjrnEYgpXrhMrVj0Va/pQo+va8NmV 5yzA== X-Gm-Message-State: AOJu0YwyDvcL8S311rJQr6kUpnbqViguC3IjEJRqjjH9cxftHcWML7Q+ amOEFJwCVWSflcsAyJuiJl5g0zrr2nx7Bz1mgNuZPt1PBVLuEf5i X-Google-Smtp-Source: AGHT+IE3hQM/CGCQCr7W2HX0AZC5bMl4JukVA8eUWG0Ozy6BgL33Gz1xcDxil3TwQEqzgiY5Az4GCw== X-Received: by 2002:a17:902:ce81:b0:1e4:6253:2f15 with SMTP id f1-20020a170902ce8100b001e462532f15mr2020178plg.16.1712635386248; Mon, 08 Apr 2024 21:03:06 -0700 (PDT) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id k12-20020a170902c40c00b001d8edfec673sm7827496plk.214.2024.04.08.21.03.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Apr 2024 21:03:05 -0700 (PDT) Message-ID: Date: Mon, 8 Apr 2024 22:03:04 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627 Content-Language: en-US To: Iain Sandoe , Jason Merrill Cc: GCC Patches , Jakub Jelinek References: <56A9A5FB-8294-47CB-A6C4-22FD5561C71A@googlemail.com> From: Jeff Law In-Reply-To: <56A9A5FB-8294-47CB-A6C4-22FD5561C71A@googlemail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 4/8/24 5:04 PM, Iain Sandoe wrote: > Hi > > PR 109627 is about functions that have had their bodies completely elided, but still have the wrappers for EH frames (either .cfi_xxx or LFSxx/LFExx). > > These are causing issues for some linkers because such functions result in FDEs with a 0 code extent. > > The simplest representation of this is (from PR109527) > > void foo () { __builtin_unreachable (); } With the possibility of sounding like a broken record, I think __builtin_unreachable is fundamentally flawed. It generates no code and just lets the program continue if ever "reached". This is a security risk and (IMHO) just plain silly. We're in a situation that is never supposed to happen, so continuing to execute code is just asking for problems. If it were up to me, I'd have __builtin_unreachable emit a trap or similar construct that should (in general) halt execution. Jeff