From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: master 8c81818673a 6/7: Tune volatile in read_char Date: Sat, 17 Aug 2024 11:16:46 -0700 Organization: UCLA Computer Science Department Message-ID: References: <172386820621.30556.15409337288904485218@vcs2.savannah.gnu.org> <20240817041648.A6687C2BC66@vcs2.savannah.gnu.org> <87zfpbgjz7.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28502"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Pip Cet , Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 17 20:17:35 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sfNza-0007Ey-89 for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Aug 2024 20:17:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfNyz-0006c1-7Q; Sat, 17 Aug 2024 14:16:57 -0400 Original-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 1sfNyu-0006Zu-B8 for emacs-devel@gnu.org; Sat, 17 Aug 2024 14:16:52 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfNys-0007Lu-E2; Sat, 17 Aug 2024 14:16:52 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id A5A873C011BD7; Sat, 17 Aug 2024 11:16:47 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id 1yl2nB8v-g6l; Sat, 17 Aug 2024 11:16:47 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 537143C011BD8; Sat, 17 Aug 2024 11:16:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 537143C011BD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1723918607; bh=fWAI4W2HsOZw/BJIg4kq+WyxXyHjjEn7zba5E0ecadI=; h=Message-ID:Date:MIME-Version:To:From; b=AjgGWsyoBNejuauKrNhFJ74bJmduZNqt1R24j7/pYtU39ZR1J34TvDWo3FHxSwXCw cC5XLC6VnQMVKetBOD+jgbcZU9gplupAz5X1sz9+mPfMGX3oKjiXVjxtOvniPLpAvd EuUSanhKXPLDygubinwfvmBOTmq2JZmApJ2D+fwkeOEu1b4c3WUVBsLgE6jvb+7jkw e3GSBQBiYdXIRzy8VNSeb/X3PLzgOOXnIRvVI7dJm93iZxypyQmvFdpd/YpjcmaaT0 dCY1DCe0kD+G5HRP04LFmQAsBBoW7T+/TQdGkm9MpKpxz2IqwTQWy5gRTS3dtmHaFx 8x5fEj2HyVedQ== X-Virus-Scanned: amavis at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id gF0Zo-Upuuyy; Sat, 17 Aug 2024 11:16:47 -0700 (PDT) Original-Received: from [192.168.254.12] (unknown [47.150.137.250]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 3641A3C011BD7; Sat, 17 Aug 2024 11:16:47 -0700 (PDT) Content-Language: en-US In-Reply-To: <87zfpbgjz7.fsf@protonmail.com> Received-SPF: pass client-ip=131.179.128.66; envelope-from=eggert@cs.ucla.edu; helo=mail.cs.ucla.edu X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322870 Archived-At: On 2024-08-17 10:03, Pip Cet wrote: > I think GCC, by its own logic, is right about this one. It doesn't know > that local_getcjmp is local (and hasn't escaped), so it would be, in > theory, possible for a signal handler to call 'longjmp' before > c_volatile is initialized. For what it's worth, gcc (GCC) 14.2.1 20240801 (Red Hat 14.2.1-1) does not issue the warning on x86-64, when Emacs is built with --enable-gcc-warnings. Either it's smarter about escaping, or it figures it's not worth issuing warnings about what random signal handlers might do, or (most likely) it's just the luck of that particular configuation. Thanks for the patch; I installed it. > I still think we should default to -Werror=clobbered to catch distributors > performing LTO builds and such. Not sure that'd be wise given the false positive that your patch fixes, More false positives are likely lurking in other GCC setups, and defaulting to -Werror=clobbered would likely break builds due to false alarms.