From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 0CA793858D35 for ; Thu, 22 Jun 2023 13:36:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CA793858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6685421cdb3so464990b3a.1 for ; Thu, 22 Jun 2023 06:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687441008; x=1690033008; 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=7QyMXj/mpQmMn/rAG8JKT+uwkWiMLWrBh1RcwSYU6Vk=; b=pcL2/YGJjPngHq7o093a1gS1JIZgSLiX7adeqmWV+AujTSJGTTU+kSl3T9SeJDyZ/p IWurJNk5DmBxWu8H33c9000kJRaprIeegbtxrMhBNBAPYbMgOpAoy3FWKknpldSquzIy g9R0094sMfio7jafpQzNyDl5Y5/23JjUql7vXvb/Cj7T0ikYUfKv8Sspni65PRPqdodl ygYHiuHPPFEld4yFPff7e9qGukkUIs0X36hPIe8kwySUpQG0Bgw0clBwKjh+KxRHQtEP 79Wu8jc0QMpWygzfMnCT92DP9zVw1TEBXl1FP5+tHJP1dEnXO2ZOyv3rUXUxlabfv0uX BCdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687441008; x=1690033008; 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=7QyMXj/mpQmMn/rAG8JKT+uwkWiMLWrBh1RcwSYU6Vk=; b=YOg0J/wbjJnX+9OCyBJGkb3MAOtniKMIGNH0WDYi8AICcIoQhaJBhkH5DXTHNTtL5r cLX1X9apXMJ+M9oZ6WH5wDkojFXWVtZziPYYjHKHxbNdVWlXU00KRR5OivTiJSTwHxKb 35Nqt5FKMDUrm+xm6Wv/YZ/gnt79G0gXZoEbdEIm2640qjhHrw9ldAHIPrIKJrPJVH8F iqxhek9sbFLV4X73d6or3/TRZiqif2YNgvMGIkgQRpiw93zXr+JyQcjl5ys4NYhD51sd Vpod6ELOc++MHb9+29pgTQGHwg7tsrzVe7KEivK192LhvSlsIWcepcEOGaahwixlizzS TWsA== X-Gm-Message-State: AC+VfDy05IRJ8oBJGXi71DFvm0EbO6siDjsFy/Sn8+acYdQn2kE6cLyL P2Ft6V7MoR+i8UCNslxo7QY= X-Google-Smtp-Source: ACHHUZ7BYd2LoaP5FPO1sw0UqiQGpmhsRB1CD2g5mssnOQ/LKnL8SNjBaFLcPfNdwNrhxZRr/wg/yQ== X-Received: by 2002:a05:6a20:442a:b0:100:ba96:e5e7 with SMTP id ce42-20020a056a20442a00b00100ba96e5e7mr28058261pzb.18.1687441007646; Thu, 22 Jun 2023 06:36:47 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id b19-20020aa78113000000b00666b3706be6sm3434277pfi.107.2023.06.22.06.36.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jun 2023 06:36:47 -0700 (PDT) Message-ID: Date: Thu, 22 Jun 2023 07:36:45 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] Improve DSE to handle stores before __builtin_unreachable () Content-Language: en-US To: Richard Biener Cc: gcc-patches@gcc.gnu.org, Jan Hubicka References: <20230620070009.C11983858D1E@sourceware.org> <7bddf09a-1535-8bcb-94da-8ad18b51963f@gmail.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 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,T_SCC_BODY_TEXT_LINE autolearn=ham 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 6/22/23 00:31, Richard Biener wrote: > I think there's a difference in that __builtin_trap () is observable > while __builtin_unreachable () is not and reaching __builtin_unreachable > () invokes undefined behavior while reaching __builtin_trap () does not. > > So the isolation code marking the trapping code volatile should be > enough and the trap () is just there to end the basic block > (and maybe be on the safe side to really trap). Agreed WRT observability -- but that's not really the point of the trap and if we wanted we could change that behavior. The trap is there to halt execution immediately rather than letting it keep running. That was a design decision from a security standpoint. If we've detected that we're executing undefined behavior, stop rather than potentially letting a malicious actor turn a bug into an exploit. jeff