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.bugs Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Date: Fri, 19 Jul 2024 14:31:45 -0700 Organization: UCLA Computer Science Department Message-ID: <73642c93-86a3-4ec1-a5ce-1d69bf2704d1@cs.ucla.edu> References: <01f0f261-60af-4282-ae1b-9f3c4e8b2ed3@cs.ucla.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------R0Nyo6X0RC4pgRSaf07MBZKI" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25576"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 72145-done@debbugs.gnu.org, rms@gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 19 23:32:43 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sUvDW-0006UA-JO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Jul 2024 23:32:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUvD1-00088V-RW; Fri, 19 Jul 2024 17:32:11 -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 1sUvCt-0007XF-GP for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 17:32:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUvCt-0002aP-7U for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 17:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sUvCs-0005UH-Bb for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 17:32:02 -0400 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jul 2024 21:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 72145@debbugs.gnu.org, eggert@cs.ucla.edu, eggert@cs.ucla.edu Original-Received: via spool by 72145-done@debbugs.gnu.org id=D72145.172142471621075 (code D ref 72145); Fri, 19 Jul 2024 21:32:02 +0000 Original-Received: (at 72145-done) by debbugs.gnu.org; 19 Jul 2024 21:31:56 +0000 Original-Received: from localhost ([127.0.0.1]:51125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUvCl-0005Tr-Gh for submit@debbugs.gnu.org; Fri, 19 Jul 2024 17:31:55 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]:41362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUvCi-0005Te-LP for 72145-done@debbugs.gnu.org; Fri, 19 Jul 2024 17:31:53 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id B107D3C011BDD; Fri, 19 Jul 2024 14:31: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 3P6-BCbbgNFS; Fri, 19 Jul 2024 14:31:46 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 4F3B93C005149; Fri, 19 Jul 2024 14:31:46 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 4F3B93C005149 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1721424706; bh=BlOzeZita82vp/cmKY20AdwQeYwWFybrdCCUzyj3KKQ=; h=Message-ID:Date:MIME-Version:To:From; b=XSoxBhVURPrfufXHKe5db1+I+44olTfSMzK3vWGuUe6iYs63YKj9+y5qNwqfs9Z1f I0WY8fQv+fAqCv8jUJ5tJG14FnGDFPCltyD5/R1pe9Hs3PvXvXIegTyPjbTjuK+ObN XXNPegizPRSjXThq5ztYErz0e2PxPqDiCf7hchjcEnN/qVsQr5rEVAcEABK6zcySS+ KCI9+cUiwUXLeT8P6c8rj6UK2RjZ44hufSkXc55Lbzk6kQGmma2mWiv9rBOuajMvh6 deSCpqA6/6nwgU2+z3Qac6j21LXTDniSe5P1zgy+SCzZ1oLByZBQfmgYTmS0yn+K+0 Z09NKVyRFAeSA== 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 ghUFVYVuiBY0; Fri, 19 Jul 2024 14:31:46 -0700 (PDT) Original-Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 2E3453C011BDD; Fri, 19 Jul 2024 14:31:46 -0700 (PDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289004 Archived-At: This is a multi-part message in MIME format. --------------R0Nyo6X0RC4pgRSaf07MBZKI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-07-18 08:19, Pip Cet wrote: > It should be mentioned that this isn't just about the CPU: the OS also needs to enable the XMM register set, right? Right. In GCC's Richard Biener suggested a more portable workaround: use -fno-tree-sra when generating 32-bit x86 code for which it is not known that SSE2 is supported. (With SSE2, -mfpmath=sse is a better workaround.) Using -fno-tree-rsa means we needn't worry whether the build and host platforms use different CPU types. I did that by installing the attached patch to Emacs on savannah, and am closing the bug report. --------------R0Nyo6X0RC4pgRSaf07MBZKI Content-Type: text/x-patch; charset=UTF-8; name="0001-Work-around-GCC-bug-58416-on-32-bit-x86.patch" Content-Disposition: attachment; filename="0001-Work-around-GCC-bug-58416-on-32-bit-x86.patch" Content-Transfer-Encoding: base64 RnJvbSA5ZjRmYzY2MDgyMTIxOTFlMWE5ZTA3YmY4OWYzOGJhOWU0ZWE3ODZjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBGcmksIDE5IEp1bCAyMDI0IDEzOjM5OjIxIC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gV29yayBhcm91bmQgR0NDIGJ1ZyA1ODQxNiBvbiAzMi1iaXQgeDg2CgoqIGNvbmZpZ3Vy ZS5hYyAoQ19TV0lUQ0hfTUFUQ0hJTkUpOiBPbiAzMi1iaXQgeDg2IHdpdGggR0NDIDQrLAph cHBlbmQgLW1mcG1hdGg9c3NlIChpZiBTU0UyIGlzIGtub3duIHRvIHdvcmspIG9yIC1mbm8t dHJlZS1zcmEKKG90aGVyd2lzZSkgdG8gd29yayBhcm91bmQgR0NDIGJ1Z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