From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jul 2024 23:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 72145@debbugs.gnu.org X-Debbugs-Original-To: Emacs bug reports and feature requests Received: via spool by submit@debbugs.gnu.org id=B.172117240729060 (code B ref -1); Tue, 16 Jul 2024 23:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jul 2024 23:26:47 +0000 Received: from localhost ([127.0.0.1]:34589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTrZG-0007Yd-L3 for submit@debbugs.gnu.org; Tue, 16 Jul 2024 19:26:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:32864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTrZD-0007YV-Lf for submit@debbugs.gnu.org; Tue, 16 Jul 2024 19:26:45 -0400 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 1sTrZA-0000wL-I9 for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 19:26:40 -0400 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 1sTrZ7-0005YK-Sj for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 19:26:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 8BB833C0140A4 for ; Tue, 16 Jul 2024 16:26:34 -0700 (PDT) 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 Ubewo4EMCe2t for ; Tue, 16 Jul 2024 16:26:34 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 0052A3C00E415 for ; Tue, 16 Jul 2024 16:26:33 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 0052A3C00E415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1721172394; bh=O/7zlizyeCfQ0/3DE45/vBaM3P+ufZRqJcXbspM82sI=; h=Message-ID:Date:MIME-Version:To:From; b=RA1Y2BYlnRuzV+JYmRY5TDakxJlGnCkLaPDDMYTBAILsVlFnKddqhHelFIUZG7NWf IqrqSi7o1A9LegM9vnJgbHcGXCDUxe08XLHbEuoGnmJyLSAooSz1JslIjANDEIGq6+ SA8ZlRNR2LIXYuLwXCtXfv20svjOPZRh/bQwKTDr5bdxw93CY7VrSDUQV1ZZad7Ald Xse2l/M9axLmNJKpu/hxCL11LwOflvVKAAgWf9gqjKGDpaSIe7EMzGu3yHQaAMcoyv 5HX5yDQSI3TH1AH37Jp2LBDPcBVFJkczTgIJdhPz6PWNzhd5XCYsgNmPaBZ4MGN/qw GyCa8MsJx4E2A== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 EJDzkBBsJDzt for ; Tue, 16 Jul 2024 16:26:33 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id DAAE83C0140A4 for ; Tue, 16 Jul 2024 16:26:33 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------ACQdPPR23JeukjDZuA8EIuWr" Message-ID: Date: Tue, 16 Jul 2024 16:26:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------ACQdPPR23JeukjDZuA8EIuWr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit While testing GNU Emacs built on Fedora 40 with gcc (GCC) 14.1.1 20240607 (Red Hat 14.1.1-5) with -m32 for x86 and configured --with-wide-int, I discovered that Emacs misbehaved in a hard-to-debug way due to GCC bug 58416. This bug causes GCC to generate wrong x86 machine instructions when a C program accesses a union containing a 'double'. The bug I observed is that if you have something like this: union u { double d; long long int i; } u; then GCC sometimes generates x86 instructions that copy u.i by using fldl/fstpl instruction pairs to push the 64-bit quantity onto the 387 floating point stack, and then pop the stack into another memory location. Unfortunately the fldl/fstpl trick fails in the unusual case when the bit pattern of u.i, when interpreted as a double, is a NaN, as that can cause the fldl/fstpl pair to store a different NaN with a different bit pattern, which means the destination integer disagrees with u.i. The bug is obscure, since the bug's presence depends on the GCC version, on the optimization options used, on the exact source code, and on the exact integer value at runtime (the value is typically copied correctly even when GCC has generated the incorrect machine code, since most long long int values don't alias with NaNs). In short the bug appears to be rare. Here are some possible courses of action: * Do nothing and hope x86 users won't run into this rare bug. * Have the GCC folks fix the bug. However, given that the bug has been reported for over a decade multiple times without a fix, it seems that fixing it is too difficult and/or too low priority for this aging platform. Also, even if the bug is fixed in future GCC the bug will still be present with people using older GCC. * Build with Clang or some other compiler instead. We should be encouraging GCC, though. * Rewrite Emacs to never use 'double' (or 'float' or 'long double') inside a union. This could be painful and hardly seems worthwhile. * When using GCC to build Emacs on x86, compile with safer options that make the bug impossible. The attached proposed patch does that, by telling GCC not to use the 387 stack. (This patch fixed the Emacs misbehavior in my experimental build.) The downside is that the resulting Emacs executables need SSE2, introduced for the Pentium 4 in 2000 . Nowadays few users need to run Emacs on non-SSE2 x86, so this may be good enough. Also, the proposed patch gives the builder an option to compile Emacs without the safer options, for people who want to build for older Intel-compatible platforms and who don't mind an occasional wrong answer or crash. --------------ACQdPPR23JeukjDZuA8EIuWr Content-Type: text/x-patch; charset=UTF-8; name="0001-Work-around-GCC-bug-58416-when-building-for-x86.patch" Content-Disposition: attachment; filename*0="0001-Work-around-GCC-bug-58416-when-building-for-x86.patch" Content-Transfer-Encoding: base64 RnJvbSBiNmM2YzA1NDU2MDc2ODdlMzZmYzQ3ZTVkNTA3OWFlYzRmNThkNTkxIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDE1IEp1bCAyMDI0IDEwOjI2OjQ3IC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gV29yayBhcm91bmQgR0NDIGJ1ZyA1ODQxNiB3aGVuIGJ1aWxkaW5nIGZvciB4ODYKCiog Y29uZmlndXJlLmFjIChDX1NXSVRDSF9NQUNISU5FKTogQWRkIC1tZnBtYXRoPXNzZSBhbmQg cGVyaGFwcwotbXNzZTIgdG8gd29yayBhcm91bmQgR0NDIGJ1ZyA1ODQxNi4KLS0tCiBjb25m aWd1cmUuYWMgfCA0MyArKysrKys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gZm9yIFNTRTIs IGludHJvZHVjZWQgYnkgSW50ZWwgaW4gMjAwMCBmb3IgdGhlIFBlbnRpdW0gNAorYW5kIGJ5 IEFNRCBpbiAyMDAzIGZvciB0aGUgT3B0ZXJvbiBhbmQgQXRobG9uIDY0LiAgVG8gYnVpbGQg RW1hY3Mgd2l0aAorR0NDIGZvciBvbGRlciB4ODYgcHJvY2Vzc29ycywgcGFzcyAnZW1hY3Nf Y3ZfZ2NjX2J1Z181ODQxNl9DRkxBR1M9bm8nIHRvCisnY29uZmlndXJlJzsgYWx0aG91Z2gg dGhlIHJlc3VsdGluZyBFbWFjcyBtYXkgZ2VuZXJhdGUgaW5jb3JyZWN0IHJlc3VsdHMKK29y IGR1bXAgY29yZSwgYW55IHN1Y2ggbWlzYmVoYXZpb3Igc2hvdWxkIGJlIHJhcmUuCisKIAwK ICogU3RhcnR1cCBDaGFuZ2VzIGluIEVtYWNzIDMxLjEKIAotLSAKMi40NS4yCgo= --------------ACQdPPR23JeukjDZuA8EIuWr-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 20:15:23 2024 Received: (at control) by debbugs.gnu.org; 17 Jul 2024 00:15:23 +0000 Received: from localhost ([127.0.0.1]:34721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTsKJ-0000Rb-I2 for submit@debbugs.gnu.org; Tue, 16 Jul 2024 20:15:23 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:35842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTsKF-0000RI-CI for control@debbugs.gnu.org; Tue, 16 Jul 2024 20:15:22 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 72BFF3C0140A4 for ; Tue, 16 Jul 2024 17:15:10 -0700 (PDT) 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 lS7SMJ5n487O for ; Tue, 16 Jul 2024 17:15:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 384CB3C00E415 for ; Tue, 16 Jul 2024 17:15:10 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 384CB3C00E415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1721175310; bh=WkFhW3jE05bm47JCCF6L70BDdAgfIxmcws+YjjpZmEA=; h=Message-ID:Date:MIME-Version:To:From; b=bZl8FoSSD2KUzOcjzmgXKeDy1pe4uxeYbFMCcmZio7+MpWCn7CYiqHBOPq8aEtW/Y kKgQeNtijbKbuxU1UFQkhFmaCTqWknJHGiKSzuplPq8MkGdgKDNmsICZJUk5qjRZsX hD8YNa9pUcasZneeFMpkMfTxQICLVI3kBDEURVpGcd9rMRxJHPAjG9s7dq2DvEsXZk EfjSJyEcN4kVeveW3Gzwf8SoSgIdavoQuFNOD59uJnnoU7uS5Dwa1uKMdXlGjIC1qx ATui+wuP1AHFI9+xiPcYJm+E3i9UnyOmf/WUc61fhld7p+Jw2D6ewdOa/1C73VeCji rCNpcVLwKOd/Q== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 xxCYxs1q0Obu for ; Tue, 16 Jul 2024 17:15:10 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 205BA3C0140A4 for ; Tue, 16 Jul 2024 17:15:10 -0700 (PDT) Message-ID: Date: Tue, 16 Jul 2024 17:15:04 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: control@debbugs.gnu.org From: Paul Eggert Subject: 72145 has a patch Organization: UCLA Computer Science Department Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 72145 + patch From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jul 2024 00:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 72145@debbugs.gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.172117790316624 (code B ref 72145); Wed, 17 Jul 2024 00:59:02 +0000 Received: (at 72145) by debbugs.gnu.org; 17 Jul 2024 00:58:23 +0000 Received: from localhost ([127.0.0.1]:34728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTszu-0004K3-G3 for submit@debbugs.gnu.org; Tue, 16 Jul 2024 20:58:22 -0400 Received: from sonic314-21.consmr.mail.ne1.yahoo.com ([66.163.189.147]:42196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTszr-0004Jn-A5 for 72145@debbugs.gnu.org; Tue, 16 Jul 2024 20:58:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721177890; bh=altrj4o6o8JY485ucJTU/BMWLHtUNEVMdrI1IAsv20A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=cFj0t5xfdD7aCZQcpA7Qv3abbz7X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.com with HTTP; Wed, 17 Jul 2024 00:58:10 +0000 Received: by hermes--production-sg3-85fdb5cfc8-shvwz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID cd96a3e21bc5953919a3014de02b10e3; Wed, 17 Jul 2024 00:58:07 +0000 (UTC) From: Po Lu In-Reply-To: (Paul Eggert's message of "Tue, 16 Jul 2024 16:26:33 -0700") References: User-Agent: Gnus/5.13 (Gnus v5.13) Date: Wed, 17 Jul 2024 08:57:58 +0800 Message-ID: <87ttgoygvd.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.22501 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 2920 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Paul Eggert writes: > While testing GNU Emacs built on Fedora 40 with gcc (GCC) 14.1.1 > 20240607 (Red Hat 14.1.1-5) with -m32 for x86 and configured > --with-wide-int, I discovered that Emacs misbehaved in a hard-to-debug > way due to GCC bug 58416. This bug causes GCC to generate wrong x86 > machine instructions when a C program accesses a union containing a > 'double'. > > The bug I observed is that if you have something like this: > > union u { double d; long long int i; } u; > > then GCC sometimes generates x86 instructions that copy u.i by using > fldl/fstpl instruction pairs to push the 64-bit quantity onto the 387 > floating point stack, and then pop the stack into another memory > location. Unfortunately the fldl/fstpl trick fails in the unusual case > when the bit pattern of u.i, when interpreted as a double, is a NaN, > as that can cause the fldl/fstpl pair to store a different NaN with a > different bit pattern, which means the destination integer disagrees > with u.i. > > The bug is obscure, since the bug's presence depends on the GCC > version, on the optimization options used, on the exact source code, > and on the exact integer value at runtime (the value is typically > copied correctly even when GCC has generated the incorrect machine > code, since most long long int values don't alias with NaNs). > > In short the bug appears to be rare. > > Here are some possible courses of action: > > * Do nothing and hope x86 users won't run into this rare bug. > > * Have the GCC folks fix the bug. However, given that the bug has been > reported for over a decade multiple times without a fix, it seems > that fixing it is too difficult and/or too low priority for this > aging platform. Also, even if the bug is fixed in future GCC the bug > will still be present with people using older GCC. > > * Build with Clang or some other compiler instead. We should be > encouraging GCC, though. > > * Rewrite Emacs to never use 'double' (or 'float' or 'long double') > inside a union. This could be painful and hardly seems worthwhile. > > * When using GCC to build Emacs on x86, compile with safer options > that make the bug impossible. The attached proposed patch does that, > by telling GCC not to use the 387 stack. (This patch fixed the Emacs > misbehavior in my experimental build.) The downside is that the > resulting Emacs executables need SSE2, introduced for the Pentium 4 > in 2000 . Nowadays few users > need to run Emacs on non-SSE2 x86, so this may be good enough. Also, > the proposed patch gives the builder an option to compile Emacs > without the safer options, for people who want to build for older > Intel-compatible platforms and who don't mind an occasional wrong > answer or crash. Wouldn't it be better if configure attempted to detect the presence of SSE2 on the host system? From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jul 2024 05:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Po Lu Cc: 72145@debbugs.gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.17211925328524 (code B ref 72145); Wed, 17 Jul 2024 05:03:02 +0000 Received: (at 72145) by debbugs.gnu.org; 17 Jul 2024 05:02:12 +0000 Received: from localhost ([127.0.0.1]:34885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTwns-0002DP-1s for submit@debbugs.gnu.org; Wed, 17 Jul 2024 01:02:12 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:33044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTwnp-0002DA-6D for 72145@debbugs.gnu.org; Wed, 17 Jul 2024 01:02:10 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id D35923C0140A4; Tue, 16 Jul 2024 22:01:59 -0700 (PDT) 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 z-31qcv2Qy2f; Tue, 16 Jul 2024 22:01:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 9751C3C00E420; Tue, 16 Jul 2024 22:01:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 9751C3C00E420 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1721192519; bh=qs/n4A1g1mndCEePEfi33qdiQYmq4pJlThXOaJW2maI=; h=Message-ID:Date:MIME-Version:To:From; b=Udw0YXEErv0QCOw1etbtXAAoj30imzK7zBdQrF3+pm4d1Pb1gIbOaxsCMhjWnSxv8 tXruoRWvBQNiYEUNhJLHSouOgwtGERNxBD11qRti2GaxDg5f4gr5GO0/B1xQLpPihS JYjrVef7Aa9sZ9RGPqL5sFfumhtXXJbOtM3Ypcxi5VZl1ckxiGl8JJJArb3NLC1Z95 gel+exgVaXaSGJkhBUXHy+c4rEsSsdUIMLS6NMBHSl4aHbbRcZH+bHchrAl1ce9x9Q IZyHMJFXUySzpiE9vz4rHb72SkVhbUdVtWGB8vi5D1ZMg0+kq7WB7aMTBxa8meO9Mj XnfSZupno+F6A== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 VoBVGI6ogxQc; Tue, 16 Jul 2024 22:01:59 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 7D6DF3C0140A4; Tue, 16 Jul 2024 22:01:59 -0700 (PDT) Message-ID: <555e555d-49d5-40b4-9c32-3d063032e0fd@cs.ucla.edu> Date: Tue, 16 Jul 2024 22:01:59 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <87ttgoygvd.fsf@yahoo.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <87ttgoygvd.fsf@yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2024-07-16 17:57, Po Lu wrote: > Wouldn't it be better if configure attempted to detect the presence of > SSE2 on the host system? We could add an AC_RUN_IFELSE test for SSE2, though I doubt whether it would affect builds significantly in practice. Build systems invariably support SSE2 nowadays and AC_RUN_IFELSE tests the build system, not the host system. From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jul 2024 21:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Po Lu Cc: 72145@debbugs.gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.172125342321608 (code B ref 72145); Wed, 17 Jul 2024 21:58:02 +0000 Received: (at 72145) by debbugs.gnu.org; 17 Jul 2024 21:57:03 +0000 Received: from localhost ([127.0.0.1]:36321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUCdz-0005cS-7u for submit@debbugs.gnu.org; Wed, 17 Jul 2024 17:57:03 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:58360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUCdw-0005bu-3Q for 72145@debbugs.gnu.org; Wed, 17 Jul 2024 17:57:01 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 69F043C011BD4; Wed, 17 Jul 2024 14:56:50 -0700 (PDT) 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 Mliyqn8AZttv; Wed, 17 Jul 2024 14:56:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id C6E583C00E413; Wed, 17 Jul 2024 14:56:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu C6E583C00E413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1721253409; bh=fCzbFshFno57FrskS9SyzkDdONbIbKzzkaPHoMoNL/4=; h=Message-ID:Date:MIME-Version:From:To; b=fXOBXncpH/MHgeC0+RO07mnWhZx7x+Qeujjbw1CZdWPFGyijEjCoXFJFzqwlXgGvn EH92cdI7FRo2DiPL9Kp8pI2xPTcRx3neXt5zgaq/SiWlC4jCyA5adnZNwiKXsQS/jj 1WNw+Iftxtm1dPO7e634WbtzydF9b7LkT1mXRi8EooFb16td10SAZw/wUu2L7uk+fD LHXdZAQyWMvFf5yorB6heteSPNJ8ud2Ihb2b9IDBHYzgPPB7aTyZvoZV9cmfJB7Hdd N014kiPK93T3A7WxUQxU8FBvtpoOPBIgT4wws1HCXBrQIjSp9rXrMIIpoUVEQDWdSH c0GG+kBX6J/Mw== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 rq24RijrlJaZ; Wed, 17 Jul 2024 14:56:49 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id A9AEE3C011BD4; Wed, 17 Jul 2024 14:56:49 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------1JC7PZ0tet0mbqM2okr0djBd" Message-ID: <6f37e80e-6226-428c-a89d-e6fda856e32d@cs.ucla.edu> Date: Wed, 17 Jul 2024 14:56:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Paul Eggert References: <87ttgoygvd.fsf@yahoo.com> <555e555d-49d5-40b4-9c32-3d063032e0fd@cs.ucla.edu> Content-Language: en-US Organization: UCLA Computer Science Department In-Reply-To: <555e555d-49d5-40b4-9c32-3d063032e0fd@cs.ucla.edu> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --------------1JC7PZ0tet0mbqM2okr0djBd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-07-16 22:01, Paul Eggert wrote: > We could add an AC_RUN_IFELSE test for SSE2, though I doubt whether it > would affect builds significantly in practice. On second thought the rare Arch or Gentoo user could still be building Emacs for the Pentium III, and for such a user a run-time test on the build host would be a win. This can be done via the attached revised patch. It uses AC_LINK_IFELSE to compile and run a single program, instead of AC_RUN_IFELSE which (when combined with AC_COMPILE_IFELSE) would mean compiling two test programs and running one. --------------1JC7PZ0tet0mbqM2okr0djBd Content-Type: text/x-patch; charset=UTF-8; name="0001-Work-around-GCC-bug-58416-when-building-for-x86.patch" Content-Disposition: attachment; filename*0="0001-Work-around-GCC-bug-58416-when-building-for-x86.patch" Content-Transfer-Encoding: base64 RnJvbSA1YjE0Njg5ZjIzODlkZjFhNDU3M2MzNmVmOWI1OTdjMWJkN2M2MzI2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDE1IEp1bCAyMDI0IDEwOjI2OjQ3IC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gV29yayBhcm91bmQgR0NDIGJ1ZyA1ODQxNiB3aGVuIGJ1aWxkaW5nIGZvciB4ODYKCiog Y29uZmlndXJlLmFjIChDX1NXSVRDSF9NQUNISU5FKTogQWRkIC1tZnBtYXRoPXNzZSBhbmQg cGVyaGFwcwotbXNzZTIgdG8gd29yayBhcm91bmQgR0NDIGJ1ZyA1ODQxNi4KLS0tCiBjb25m aWd1cmUuYWMgfCA1MyArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrCiBldGMvTkVXUyAgICAgfCAxMCArKysrKysrKysrCiAyIGZpbGVzIGNo YW5nZWQsIDYzIGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9jb25maWd1cmUuYWMgYi9j b25maWd1cmUuYWMKaW5kZXggZTJiNmRjMmZjNGQuLjhkNmZmMmM0ZGIzIDEwMDY0NAotLS0g YS9jb25maWd1cmUuYWMKKysrIGIvY29uZmlndXJlLmFjCkBAIC0yMzI1LDYgKzIzMjUsNTkg QEAgQUNfREVGVU4KICAgICBmaQogICA7OwogZXNhYworCitBQ19DQUNIRV9DSEVDSyhbZm9y IGZsYWdzIHRvIHdvcmsgYXJvdW5kIEdDQyBidWcgNTg0MTZdLAorICBbZW1hY3NfY3ZfU1NF Ml9DRkxBR1NdLAorICBbZW1hY3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dGhsb24gNjQuICBUbyBidWlsZCBFbWFjcyB3aXRoCitHQ0MgZm9y IG9sZGVyIHg4NiwgZWl0aGVyIGJ1aWxkIG5hdGl2ZWx5IG9uIGEgc3lzdGVtIHRoYXQgbGFj a3MgU1NFMiwgb3IKK3Bhc3MgJ2VtYWNzX2N2X1NTRTJfQ0ZMQUdTPW5vJyB0byAnY29uZmln dXJlJzsgYWx0aG91Z2ggdGhlIHJlc3VsdGluZworRW1hY3MgbWF5IGdlbmVyYXRlIGluY29y cmVjdCByZXN1bHRzIG9yIGR1bXAgY29yZSwgYW55IHN1Y2ggbWlzYmVoYXZpb3IKK3Nob3Vs ZCBiZSByYXJlLgorCiAMCiAqIFN0YXJ0dXAgQ2hhbmdlcyBpbiBFbWFjcyAzMS4xCiAKLS0g CjIuNDUuMgoK --------------1JC7PZ0tet0mbqM2okr0djBd-- From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jul 2024 02:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 72145@debbugs.gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.172127041517730 (code B ref 72145); Thu, 18 Jul 2024 02:41:02 +0000 Received: (at 72145) by debbugs.gnu.org; 18 Jul 2024 02:40:15 +0000 Received: from localhost ([127.0.0.1]:36480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUH42-0004bu-OQ for submit@debbugs.gnu.org; Wed, 17 Jul 2024 22:40:15 -0400 Received: from sonic314-22.consmr.mail.ne1.yahoo.com ([66.163.189.148]:36576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUH3z-0004bc-3x for 72145@debbugs.gnu.org; Wed, 17 Jul 2024 22:40:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721270400; bh=cyiSaF+jiJxJ07/92wBvhoYRqDeSli+RqhVsd3rNew8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Tdu+v86EAxsCDwkCe31qNeTqD7BdmFhtNGPTIPoLsvkvkNgKIOBPV/iWTxIVw7D+aiwE7GNfpBruXH8cfSCdRv9H+gcp/BqvZSQQRRvnXIDNdUOaapNRFYWpjhwuobVuyiox9BPOs1UytVpLBJBUidUhhcaJ3eiW4KNck3VCgS7qf2nTYEJEQW0e2I27y6HrPIpq+pqDHQy1avm1l9gZ9/1JM7MrpqalkRBLzpnh+LwS710Q9rL2xWYJfNi/agBV2shzonXz9WMbN5k3/EhwjHqDEqbnlEE937fMLpqOh2vh2RDAgMx+gETWejq/4Mp1yqd3mW8E5i+EwIcEcPdIQg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721270400; bh=6oXui3z/RC9kBFf3C9dLBL46qEwHo8uYw+76BejIQPr=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=j1DeqYvjZND3dVp6hj/mxxUeOri9dsBtHDPRw6Kuv0XH0tu96woeBB+3s2ZxtkSHdtMJttNsk8xFbE9SJC92oOiOSU0mIEGP/B9zqpHP2I4zdEinDup7lAn7guiCh/JBGZydhFdBL8OdjaADTDa+P7Z9iZWAgymq5asI73Gr/gdWBM8/oi8mTIkc+9AeHmc3vwLtQNS4BrPBD5di5psPH8viydAuc2eEFAbTRmc3bf2QB1/tEJCrbMLSvNgDMzL/PKikbpmVoHAX/rtXv87dr4XRyXwVH7L+KgpsQIFvBDa5yG+fgva8CkKkXQ3zoO15IAUfQoFujaULbIEs2BRQ0w== X-YMail-OSG: 3FlP9t4VM1nfLyXRtmdm5Hpopla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76HchM9_JSj eUL9z18r73GpT9yBTw28nuMb7bKqXDqETo1JssvIuvQJRTjsMfJ2fxVLBU3YdKkJhgUWwrs1P.ck PHbgWJyZbe87JYRtmBllRTZkahwkK2NW2pV0sGTvxyheZxI50 X-Sonic-MF: X-Sonic-ID: ae59c000-2fec-4f55-b506-e0e2c582c6a2 Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Thu, 18 Jul 2024 02:40:00 +0000 Received: by hermes--production-sg3-85fdb5cfc8-bmdnx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0f77514dbfe598efd080c72f21abd4d5; Thu, 18 Jul 2024 02:39:48 +0000 (UTC) From: Po Lu In-Reply-To: <6f37e80e-6226-428c-a89d-e6fda856e32d@cs.ucla.edu> (Paul Eggert's message of "Wed, 17 Jul 2024 14:56:49 -0700") References: <87ttgoygvd.fsf@yahoo.com> <555e555d-49d5-40b4-9c32-3d063032e0fd@cs.ucla.edu> <6f37e80e-6226-428c-a89d-e6fda856e32d@cs.ucla.edu> Date: Thu, 18 Jul 2024 10:39:42 +0800 Message-ID: <87msmfxw29.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.22501 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 762 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Paul Eggert writes: > On 2024-07-16 22:01, Paul Eggert wrote: >> We could add an AC_RUN_IFELSE test for SSE2, though I doubt whether >> it would affect builds significantly in practice. > > On second thought the rare Arch or Gentoo user could still be building > Emacs for the Pentium III, and for such a user a run-time test on the > build host would be a win. This can be done via the attached revised > patch. It uses AC_LINK_IFELSE to compile and run a single program, > instead of AC_RUN_IFELSE which (when combined with AC_COMPILE_IFELSE) > would mean compiling two test programs and running one. I'm thinking of the computer where I produce binaries for Windows 9X, which, being a Windows 98 system, probably does not support SSE2. From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jul 2024 03:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 72145@debbugs.gnu.org Reply-To: rms@gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.172127307122553 (code B ref 72145); Thu, 18 Jul 2024 03:25:02 +0000 Received: (at 72145) by debbugs.gnu.org; 18 Jul 2024 03:24:31 +0000 Received: from localhost ([127.0.0.1]:36492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUHkt-0005rg-6x for submit@debbugs.gnu.org; Wed, 17 Jul 2024 23:24:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUHkp-0005rR-F3 for 72145@debbugs.gnu.org; Wed, 17 Jul 2024 23:24:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUHia-0003rF-2I; Wed, 17 Jul 2024 23:22:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=X/+IZrwpIZGLma9fsxw/ewhhut64FH4m/+3hBtuiB8U=; b=COXkJ7gawWBt Z6CxFSOMZPOGGVC0Mw+H538Um9vQvDLlwHmY+F9xC/LBKsQw86clNRExiFeyoVWbyqDq9nrbIJd3n +wBqx9M33x9U3W4WdiGqd1Q0cv7lPp4l0jZUeBa8cD+If+dPG0qlkW0VRZwZE93lqTLvE/91KkcpU e7SHQNK31J0fqn1+69g2RipY+j787fOiNFw9j0ZRsChpYg3g2NjBkK5c6BIPC/YWMa6SZQEqrjckU XHeBB6AEQRxgkBVNzwCAt3VEITd9cK58CFvt0TNC0/R3HbS0/+GiMtXL+FC0IKvS+Zk44ihfY9rr4 /7AWv5c6YJEoqco1oLv/tw==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sUHiZ-0005qB-7B; Wed, 17 Jul 2024 23:22:07 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman In-Reply-To: (message from Paul Eggert on Tue, 16 Jul 2024 16:26:33 -0700) References: Message-Id: Date: Wed, 17 Jul 2024 23:22:07 -0400 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > * Rewrite Emacs to never use 'double' (or 'float' or 'long double') > inside a union. This could be painful and hardly seems worthwhile. Where does Emacs use those types inside a union? Maybe this is not difficult. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jul 2024 05:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Po Lu Cc: 72145@debbugs.gnu.org, eggert@cs.ucla.edu Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.17212796801619 (code B ref 72145); Thu, 18 Jul 2024 05:15:02 +0000 Received: (at 72145) by debbugs.gnu.org; 18 Jul 2024 05:14:40 +0000 Received: from localhost ([127.0.0.1]:36679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUJTU-0000Q0-D5 for submit@debbugs.gnu.org; Thu, 18 Jul 2024 01:14:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUJTS-0000Pn-Fa for 72145@debbugs.gnu.org; Thu, 18 Jul 2024 01:14:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUJTJ-0001H2-57; Thu, 18 Jul 2024 01:14:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xc8E/+o3DArx+NUoTAZxVyCcz7sJC6KqDoyUfMMI2Jc=; b=FtNZU835J4zF hdBztCDs77yL/ONpeDc2e33JNRlM8bgCVg677Bkr06H2WUea3DWOew8+nwPH+dOgS/kXpX+EY3mP+ 4lgoJDxtVMvmyAq4xyLnqII0m07bfsculYOtKtEtES5k3QZrWo7oQtea03E7PTP19Ju6n9yMT48Yi 8L9yFrAp/KKaX3JE8rAb0f8gd9z05Eb3/aDFE6Z1VNv8HDhHdhnG37uiixR6wU4r1zkcHPY28Kp6I +Eq7rEYKmqWkjsRkookdD/AqQHeVzOYkma7Xe3KpCqpa7dS+zIKoXiUG6H57enGCcWLokPjT//Skp Ej7X6tO/afRiLyNBwGTjZw==; Date: Thu, 18 Jul 2024 08:14:27 +0300 Message-Id: <86y15zffik.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87msmfxw29.fsf@yahoo.com> (bug-gnu-emacs@gnu.org) References: <87ttgoygvd.fsf@yahoo.com> <555e555d-49d5-40b4-9c32-3d063032e0fd@cs.ucla.edu> <6f37e80e-6226-428c-a89d-e6fda856e32d@cs.ucla.edu> <87msmfxw29.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 72145@debbugs.gnu.org > Date: Thu, 18 Jul 2024 10:39:42 +0800 > From: Po Lu via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Paul Eggert writes: > > > On 2024-07-16 22:01, Paul Eggert wrote: > >> We could add an AC_RUN_IFELSE test for SSE2, though I doubt whether > >> it would affect builds significantly in practice. > > > > On second thought the rare Arch or Gentoo user could still be building > > Emacs for the Pentium III, and for such a user a run-time test on the > > build host would be a win. This can be done via the attached revised > > patch. It uses AC_LINK_IFELSE to compile and run a single program, > > instead of AC_RUN_IFELSE which (when combined with AC_COMPILE_IFELSE) > > would mean compiling two test programs and running one. > > I'm thinking of the computer where I produce binaries for Windows 9X, > which, being a Windows 98 system, probably does not support SSE2. Look at the Properties to see what kind of CPU it has. Then you can establish whether it supports SSE2. But I think the problem is not where you produce the binaries, the problem is where people will run them. On Windows, it is very frequently a completely different system, so a test on the build host is insufficient. I think builds for Windows 9X should use the 'emacs_cv_SSE2_CFLAGS=no' thing regardless of what the build host supports, because otherwise the binary will simply refuse to run on the target. From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jul 2024 12:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: rms@gnu.org Cc: 72145@debbugs.gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.17213063203667 (code B ref 72145); Thu, 18 Jul 2024 12:39:02 +0000 Received: (at 72145) by debbugs.gnu.org; 18 Jul 2024 12:38:40 +0000 Received: from localhost ([127.0.0.1]:37122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUQPA-0000x4-0o for submit@debbugs.gnu.org; Thu, 18 Jul 2024 08:38:40 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:51010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUQP7-0000wl-Hs for 72145@debbugs.gnu.org; Thu, 18 Jul 2024 08:38:38 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 25D743C011BC5; Thu, 18 Jul 2024 05:38:27 -0700 (PDT) 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 hoNk3WA9pFDr; Thu, 18 Jul 2024 05:38:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 927253C011BD8; Thu, 18 Jul 2024 05:38:26 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 927253C011BD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1721306306; bh=ZPhsuQAFV3QgZ2OU4R7dDrX/oB+jWsxlpw4iVWiR6UQ=; h=Message-ID:Date:MIME-Version:To:From; b=YzgVoGEwaqlCgPc9b1MG5EfWDBUSJQTCdUAqxf9J+fxPLP9MHlEG9DLB27j5hyqqK IEjZ31vgAVSINaeHkMCvIzMSAkTd1ytStSz/WPBap2W6tm5XB9pEfiWz9FwB+IgM5V Fk1R05JUi2XPW9IHAKXaeAJcPPNV1owrpNWN2OvEx3MTl0ZHMVUuYaOQPuO16PQQlB Pi7WFw33RYemw4YUzTFd7y0aHrOFNwftvTPBjuVm91T+inFdDNqmkxgBNna4PmnjXR Hkm0BDk51uPXfRNKWkDnG/qi4jCv1lPBRsgk/kv2a/43TZA87FZAqFmTtb/dI3+ltF fHtObZTxKW31g== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 Kkt5UZgfV5w4; Thu, 18 Jul 2024 05:38:26 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 73D5B3C011BC5; Thu, 18 Jul 2024 05:38:26 -0700 (PDT) Message-ID: <01f0f261-60af-4282-ae1b-9f3c4e8b2ed3@cs.ucla.edu> Date: Thu, 18 Jul 2024 05:38:26 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2024-07-17 20:22, Richard Stallman wrote: > > * Rewrite Emacs to never use 'double' (or 'float' or 'long double') > > inside a union. This could be painful and hardly seems worthwhile. > > Where does Emacs use those types inside a union? > Maybe this is not difficult. I found the bug in src/timefns.c, which uses a union to represent timestamp forms (one of which represents an Emacs float). Other uses that come to mind are src/lisp.h's struct Lisp_Float, which uses a union to save space when representing Lisp floats, and src/lread.c's and src/print.c's use of 's unions to deal with NaNs when reading and printing Lisp floats. Although I have not done an audit I expect there are other places too, and I expect it would take some time to audit, rewrite and thoroughly test Emacs to not use floating point in these places, with runtime performance degraded somewhat as a result. Although that effort might be worth it if the bug was likely and there was no other workaround, the bug is quite rare (we've lived with it for decades and I'm the first person to notice it, or at least track it down), and with the proposed compiler-flag workaround the remaining affected platforms are so obsolescent (decades-old CPUs) that they're also rare. I doubt whether it's worth significantly contorting the C code (possibly introducing bugs on mainstream platforms) to fix these exceedingly rare bugs in obsolescent platforms. From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jul 2024 14:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 72145@debbugs.gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.172131235614837 (code B ref 72145); Thu, 18 Jul 2024 14:20:02 +0000 Received: (at 72145) by debbugs.gnu.org; 18 Jul 2024 14:19:16 +0000 Received: from localhost ([127.0.0.1]:37795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sURyV-0003rF-SW for submit@debbugs.gnu.org; Thu, 18 Jul 2024 10:19:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sURyT-0003r0-Q3 for 72145@debbugs.gnu.org; Thu, 18 Jul 2024 10:19:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sURyJ-0004lE-Rn; Thu, 18 Jul 2024 10:19:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=mnNRcRR0Zj0R+VId073fHfoQN2jyK1UGvLzU61/rE4M=; b=gTsCTjQlbKH5TYPREaFh fY+EPYpIoDmcgzOoEaf5tNSSIZQlMexGZIHHoFFb+EjdptDMpC5PACmQoIAblza0F3iLNB2wIF32a sM/2s+DVlorhWtbYskTLEVcoZMTVFRbfkCzt5JQOLX0MOgL2vcFvdgc2LMLXZLtEIs+rjUGnZ6wWg 3sNFakGSopCeeaTy8iofcQpcITWcFTkM7YHANNjcWVfNlCcbg8jlcoMgvi+9HX96fk2yPlF8FUoNI WbXyK9YjcSHrLKOSWnyYZ3git2GnMCOzOzx5h0wPkmHGPhJUFB55/tKt821yweSeEstwBpd/08JBJ Ni5zVj5Oi0M1RQ==; Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sURyJ-0002xk-KD; Thu, 18 Jul 2024 10:19:03 -0400 From: Andrea Corallo In-Reply-To: (Paul Eggert's message of "Tue, 16 Jul 2024 16:26:33 -0700") References: Date: Thu, 18 Jul 2024 10:19:03 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Paul Eggert writes: > While testing GNU Emacs built on Fedora 40 with gcc (GCC) 14.1.1 > 20240607 (Red Hat 14.1.1-5) with -m32 for x86 and configured > --with-wide-int, I discovered that Emacs misbehaved in a hard-to-debug > way due to GCC bug 58416. This bug causes GCC to generate wrong x86 > machine instructions when a C program accesses a union containing a > 'double'. > > The bug I observed is that if you have something like this: > > union u { double d; long long int i; } u; > > then GCC sometimes generates x86 instructions that copy u.i by using > fldl/fstpl instruction pairs to push the 64-bit quantity onto the 387 > floating point stack, and then pop the stack into another memory > location. Unfortunately the fldl/fstpl trick fails in the unusual case > when the bit pattern of u.i, when interpreted as a double, is a NaN, > as that can cause the fldl/fstpl pair to store a different NaN with a > different bit pattern, which means the destination integer disagrees > with u.i. > > The bug is obscure, since the bug's presence depends on the GCC > version, on the optimization options used, on the exact source code, > and on the exact integer value at runtime (the value is typically > copied correctly even when GCC has generated the incorrect machine > code, since most long long int values don't alias with NaNs). > > In short the bug appears to be rare. > > Here are some possible courses of action: > > * Do nothing and hope x86 users won't run into this rare bug. > > * Have the GCC folks fix the bug. However, given that the bug has been > reported for over a decade multiple times without a fix, it seems > that fixing it is too difficult and/or too low priority for this > aging platform. Also, even if the bug is fixed in future GCC the bug > will still be present with people using older GCC. > > * Build with Clang or some other compiler instead. We should be > encouraging GCC, though. > > * Rewrite Emacs to never use 'double' (or 'float' or 'long double') > inside a union. This could be painful and hardly seems worthwhile. > > * When using GCC to build Emacs on x86, compile with safer options > that make the bug impossible. The attached proposed patch does that, > by telling GCC not to use the 387 stack. (This patch fixed the Emacs > misbehavior in my experimental build.) The downside is that the > resulting Emacs executables need SSE2, introduced for the Pentium 4 > in 2000 . Nowadays few users > need to run Emacs on non-SSE2 x86, so this may be good enough. Also, > the proposed patch gives the builder an option to compile Emacs > without the safer options, for people who want to build for older > Intel-compatible platforms and who don't mind an occasional wrong > answer or crash. Mmmh nice one :) I asked GCC people if they have a suggestion on how to work around this bug . Thanks Andrea From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jul 2024 15:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 72145@debbugs.gnu.org, rms@gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.172131601721361 (code B ref 72145); Thu, 18 Jul 2024 15:21:02 +0000 Received: (at 72145) by debbugs.gnu.org; 18 Jul 2024 15:20:17 +0000 Received: from localhost ([127.0.0.1]:37882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUSvZ-0005YT-9Q for submit@debbugs.gnu.org; Thu, 18 Jul 2024 11:20:17 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:49783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUSvW-0005YB-A5 for 72145@debbugs.gnu.org; Thu, 18 Jul 2024 11:20:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1721316004; x=1721575204; bh=P0kW4JyGbKSCW65cqDDoqF7DaAtLdPq0Uzqu4QbASk0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=UGtIX/PwmD6xQAebN+948olC+iRNXjrEP9Hn6P3ZYC8cAJ/ZxhKRY090t1ViatUOw 8bvjYFrXS0RzJukQqBZ+0rhz50ghj4AuTP+GvVAfTTChOloKNIwePD8qOcy0wvZfJz P42hZrt8+CCfH1i+N4Nw2LJFuYo7or8xlMlzDSO3f93EmFquqWS07d6L0r/IoiYAqR tGN5LVEhDrpiDFZm8qfNbjrri2bgBRJRetrXucarJWX5cQHqxDxyf/d5ht3Gzj/d1k 00bJQzwCv2TcuMBJgrBl/szN/LuhLP2I0u6VJUOwaMuDlWncgeiox7ZLfE0s2/IzZW puMKxfCqyfYnA== Date: Thu, 18 Jul 2024 15:19:55 +0000 From: Pip Cet Message-ID: In-Reply-To: <01f0f261-60af-4282-ae1b-9f3c4e8b2ed3@cs.ucla.edu> References: <01f0f261-60af-4282-ae1b-9f3c4e8b2ed3@cs.ucla.edu> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 40e17c79af6b7a889b4024c17052b61ee85212e8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thursday, July 18th, 2024 at 12:38, Paul Eggert wro= te: > On 2024-07-17 20:22, Richard Stallman wrote: >=20 > > > * Rewrite Emacs to never use 'double' (or 'float' or 'long double') > > > inside a union. This could be painful and hardly seems worthwhile. > >=20 > > Where does Emacs use those types inside a union? > > Maybe this is not difficult. >=20 >=20 > I found the bug in src/timefns.c, which uses a union to represent > timestamp forms (one of which represents an Emacs float). Other uses > that come to mind are src/lisp.h's struct Lisp_Float, which uses a union > to save space when representing Lisp floats, and src/lread.c's and > src/print.c's use of 's unions to deal with NaNs when reading >=20 > and printing Lisp floats. Although I have not done an audit I expect > there are other places too, and I expect it would take some time to > audit, rewrite and thoroughly test Emacs to not use floating point in > these places, with runtime performance degraded somewhat as a result. >=20 > Although that effort might be worth it if the bug was likely and there > was no other workaround, the bug is quite rare (we've lived with it for > decades and I'm the first person to notice it, or at least track it > down), and with the proposed compiler-flag workaround the remaining > affected platforms are so obsolescent (decades-old CPUs) that they're > also rare. I doubt whether it's worth significantly contorting the C > code (possibly introducing bugs on mainstream platforms) to fix these > exceedingly rare bugs in obsolescent platforms. It should be mentioned that this isn't just about the CPU: the OS also need= s to enable the XMM register set, right? That means we might end up droppin= g support for many old platforms as well as old CPUs and emulators, and I'm= not sure that's a good idea. Pip From unknown Sun Jun 22 22:46:50 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Paul Eggert Subject: bug#72145: closed (Re: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416) Message-ID: References: <73642c93-86a3-4ec1-a5ce-1d69bf2704d1@cs.ucla.edu> X-Gnu-PR-Message: they-closed 72145 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 72145@debbugs.gnu.org Date: Fri, 19 Jul 2024 21:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1721424722-21090-1" This is a multi-part message in MIME format... ------------=_1721424722-21090-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #72145: rare Emacs screwups on x86 due to GCC bug 58416 which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 72145@debbugs.gnu.org. --=20 72145: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D72145 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1721424722-21090-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 72145-done) by debbugs.gnu.org; 19 Jul 2024 21:31:56 +0000 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 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 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) 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) 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 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) 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-Type: multipart/mixed; boundary="------------R0Nyo6X0RC4pgRSaf07MBZKI" Message-ID: <73642c93-86a3-4ec1-a5ce-1d69bf2704d1@cs.ucla.edu> Date: Fri, 19 Jul 2024 14:31:45 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 To: Pip Cet References: <01f0f261-60af-4282-ae1b-9f3c4e8b2ed3@cs.ucla.edu> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72145-done Cc: 72145-done@debbugs.gnu.org, rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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-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content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 Jul 2024 23:26:47 +0000 Received: from localhost ([127.0.0.1]:34589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTrZG-0007Yd-L3 for submit@debbugs.gnu.org; Tue, 16 Jul 2024 19:26:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:32864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTrZD-0007YV-Lf for submit@debbugs.gnu.org; Tue, 16 Jul 2024 19:26:45 -0400 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 1sTrZA-0000wL-I9 for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 19:26:40 -0400 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 1sTrZ7-0005YK-Sj for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 19:26:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 8BB833C0140A4 for ; Tue, 16 Jul 2024 16:26:34 -0700 (PDT) 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 Ubewo4EMCe2t for ; Tue, 16 Jul 2024 16:26:34 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 0052A3C00E415 for ; Tue, 16 Jul 2024 16:26:33 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 0052A3C00E415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1721172394; bh=O/7zlizyeCfQ0/3DE45/vBaM3P+ufZRqJcXbspM82sI=; h=Message-ID:Date:MIME-Version:To:From; b=RA1Y2BYlnRuzV+JYmRY5TDakxJlGnCkLaPDDMYTBAILsVlFnKddqhHelFIUZG7NWf IqrqSi7o1A9LegM9vnJgbHcGXCDUxe08XLHbEuoGnmJyLSAooSz1JslIjANDEIGq6+ SA8ZlRNR2LIXYuLwXCtXfv20svjOPZRh/bQwKTDr5bdxw93CY7VrSDUQV1ZZad7Ald Xse2l/M9axLmNJKpu/hxCL11LwOflvVKAAgWf9gqjKGDpaSIe7EMzGu3yHQaAMcoyv 5HX5yDQSI3TH1AH37Jp2LBDPcBVFJkczTgIJdhPz6PWNzhd5XCYsgNmPaBZ4MGN/qw GyCa8MsJx4E2A== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 EJDzkBBsJDzt for ; Tue, 16 Jul 2024 16:26:33 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id DAAE83C0140A4 for ; Tue, 16 Jul 2024 16:26:33 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------ACQdPPR23JeukjDZuA8EIuWr" Message-ID: Date: Tue, 16 Jul 2024 16:26:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Emacs bug reports and feature requests From: Paul Eggert Subject: rare Emacs screwups on x86 due to GCC bug 58416 Organization: UCLA Computer Science Department 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------ACQdPPR23JeukjDZuA8EIuWr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit While testing GNU Emacs built on Fedora 40 with gcc (GCC) 14.1.1 20240607 (Red Hat 14.1.1-5) with -m32 for x86 and configured --with-wide-int, I discovered that Emacs misbehaved in a hard-to-debug way due to GCC bug 58416. This bug causes GCC to generate wrong x86 machine instructions when a C program accesses a union containing a 'double'. The bug I observed is that if you have something like this: union u { double d; long long int i; } u; then GCC sometimes generates x86 instructions that copy u.i by using fldl/fstpl instruction pairs to push the 64-bit quantity onto the 387 floating point stack, and then pop the stack into another memory location. Unfortunately the fldl/fstpl trick fails in the unusual case when the bit pattern of u.i, when interpreted as a double, is a NaN, as that can cause the fldl/fstpl pair to store a different NaN with a different bit pattern, which means the destination integer disagrees with u.i. The bug is obscure, since the bug's presence depends on the GCC version, on the optimization options used, on the exact source code, and on the exact integer value at runtime (the value is typically copied correctly even when GCC has generated the incorrect machine code, since most long long int values don't alias with NaNs). In short the bug appears to be rare. Here are some possible courses of action: * Do nothing and hope x86 users won't run into this rare bug. * Have the GCC folks fix the bug. However, given that the bug has been reported for over a decade multiple times without a fix, it seems that fixing it is too difficult and/or too low priority for this aging platform. Also, even if the bug is fixed in future GCC the bug will still be present with people using older GCC. * Build with Clang or some other compiler instead. We should be encouraging GCC, though. * Rewrite Emacs to never use 'double' (or 'float' or 'long double') inside a union. This could be painful and hardly seems worthwhile. * When using GCC to build Emacs on x86, compile with safer options that make the bug impossible. The attached proposed patch does that, by telling GCC not to use the 387 stack. (This patch fixed the Emacs misbehavior in my experimental build.) The downside is that the resulting Emacs executables need SSE2, introduced for the Pentium 4 in 2000 . Nowadays few users need to run Emacs on non-SSE2 x86, so this may be good enough. Also, the proposed patch gives the builder an option to compile Emacs without the safer options, for people who want to build for older Intel-compatible platforms and who don't mind an occasional wrong answer or crash. --------------ACQdPPR23JeukjDZuA8EIuWr Content-Type: text/x-patch; charset=UTF-8; name="0001-Work-around-GCC-bug-58416-when-building-for-x86.patch" Content-Disposition: attachment; filename*0="0001-Work-around-GCC-bug-58416-when-building-for-x86.patch" Content-Transfer-Encoding: base64 RnJvbSBiNmM2YzA1NDU2MDc2ODdlMzZmYzQ3ZTVkNTA3OWFlYzRmNThkNTkxIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDE1IEp1bCAyMDI0IDEwOjI2OjQ3IC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gV29yayBhcm91bmQgR0NDIGJ1ZyA1ODQxNiB3aGVuIGJ1aWxkaW5nIGZvciB4ODYKCiog Y29uZmlndXJlLmFjIChDX1NXSVRDSF9NQUNISU5FKTogQWRkIC1tZnBtYXRoPXNzZSBhbmQg cGVyaGFwcwotbXNzZTIgdG8gd29yayBhcm91bmQgR0NDIGJ1ZyA1ODQxNi4KLS0tCiBjb25m aWd1cmUuYWMgfCA0MyArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrCiBldGMvTkVXUyAgICAgfCAgOSArKysrKysrKysKIDIgZmlsZXMgY2hhbmdlZCwgNTIg aW5zZXJ0aW9ucygrKQoKZGlmZiAtLWdpdCBhL2NvbmZpZ3VyZS5hYyBiL2NvbmZpZ3VyZS5h YwppbmRleCBlMmI2ZGMyZmM0ZC4uNGU3NGQ2NmM2NWYgMTAwNjQ0Ci0tLSBhL2N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1Z181ODQxNl9DRkxBR1M9bm8nIHRvCisnY29uZmlndXJlJzsgYWx0aG91Z2gg dGhlIHJlc3VsdGluZyBFbWFjcyBtYXkgZ2VuZXJhdGUgaW5jb3JyZWN0IHJlc3VsdHMKK29y IGR1bXAgY29yZSwgYW55IHN1Y2ggbWlzYmVoYXZpb3Igc2hvdWxkIGJlIHJhcmUuCisKIAwK ICogU3RhcnR1cCBDaGFuZ2VzIGluIEVtYWNzIDMxLjEKIAotLSAKMi40NS4yCgo= --------------ACQdPPR23JeukjDZuA8EIuWr-- ------------=_1721424722-21090-1-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 02:42:16 2024 Received: (at control) by debbugs.gnu.org; 22 Aug 2024 06:42:16 +0000 Received: from localhost ([127.0.0.1]:36593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh1WS-0007h4-7V for submit@debbugs.gnu.org; Thu, 22 Aug 2024 02:42:16 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:55948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh1WP-0007gn-DH for control@debbugs.gnu.org; Thu, 22 Aug 2024 02:42:14 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 2ECF13C00E41C for ; Wed, 21 Aug 2024 23:41:22 -0700 (PDT) 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 UjUZtxoMK8Op for ; Wed, 21 Aug 2024 23:41:21 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id A76E93C00E415 for ; Wed, 21 Aug 2024 23:41:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu A76E93C00E415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1724308881; bh=254Rd07IlHKbHd1TzUYuHBhAxD5v6hggONkW1O7DkfM=; h=Message-ID:Date:MIME-Version:To:From; b=HrSB6+/zmlgbXas50Wgs0e3nVy1+NZef0JofW7FSoJmJy7p/yrziKVXezo06p33jw WGjS8YC1tU2eIOCSyMmpDEEdzSMhXjiEqvbTyeo9EpGNJNP/mIjc9jJEkPU72AWeZX kMaNItApJTwMdyWhKtgKuTmD5nvdGMg04at2SaUJca9VoJQ249DF87/uWoRyZ11BIO ebM7Jf4/SMTFjT/2TTcwiLwuoOqWK+sYgWsnWEDPgFjjeg2dohN3VtKHU8IK7XYWrN DH7NdloYM78NZPVppTG/9uxYFua5FS1QF+K0JsN0bav4Ipr0Id/ZfCTymtqgdG+jDe DPM/VPyNx0E+Q== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 lt2RmV6IMPPN for ; Wed, 21 Aug 2024 23:41:21 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.150.137.250]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 913EA3C00E402 for ; Wed, 21 Aug 2024 23:41:21 -0700 (PDT) Message-ID: <411f26e0-130c-494a-a3a5-99a2a9d1b68d@cs.ucla.edu> Date: Wed, 21 Aug 2024 23:41:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: control@debbugs.gnu.org From: Paul Eggert Subject: unarchive 72145 Organization: UCLA Computer Science Department Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) unarchive 72145 From unknown Sun Jun 22 22:46:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Aug 2024 06:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Pip Cet Cc: 72145@debbugs.gnu.org, rms@gnu.org Received: via spool by 72145-submit@debbugs.gnu.org id=B72145.172430912729955 (code B ref 72145); Thu, 22 Aug 2024 06:46:02 +0000 Received: (at 72145) by debbugs.gnu.org; 22 Aug 2024 06:45:27 +0000 Received: from localhost ([127.0.0.1]:36604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh1ZX-0007n5-8n for submit@debbugs.gnu.org; Thu, 22 Aug 2024 02:45:27 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:49686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh1ZU-0007mr-Pm for 72145@debbugs.gnu.org; Thu, 22 Aug 2024 02:45:25 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 0548B3C00E402; Wed, 21 Aug 2024 23:44:34 -0700 (PDT) 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 xfmtf88NtODg; Wed, 21 Aug 2024 23:44:33 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 9CA763C00E415; Wed, 21 Aug 2024 23:44:33 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 9CA763C00E415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1724309073; bh=pT8cAlKyPZ4qHbz6OSq3U9+teMAb20Qn8+VOik+f7Io=; h=Message-ID:Date:MIME-Version:From:To; b=hIlezYArYv7g0IQClo07+DlML+excOA6qmxS6e/MyCbmbrVsDk5iitg2cvvOA86RI zkJdsA2oo5EtbaCG8x0xK4c2dtn8lwHYF4tbKns5NO+5CfI+L1v34N5OjZ1pK/Mw3e ZnhfUohYyPhV4ZglFdMz5LRWC9fLiRpUzCNq1tHTlON2dU1k8aHLfYUJs+o51AWATw n1zTHDwD+PD5feexYitk7eLzh+FYnbHfNV1yr8rjpq/b/ppUdcMZV4976Os31mALK7 gkxMe/HaY7XzDVy1ZbPZ3tdARIrEgU7OgiJqQHCWoT7hEx1LA7m4ZJbuarEFEA45Iz Yocw4AXhB64Jw== X-Virus-Scanned: amavis at mail.cs.ucla.edu 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 ruFWSjEwLYzN; Wed, 21 Aug 2024 23:44:33 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.150.137.250]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 7F2A73C00E402; Wed, 21 Aug 2024 23:44:33 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------WNC7tpPsUqdi3mP5u04W0Pab" Message-ID: <3a241959-6904-4bdd-b272-714e124cf26d@cs.ucla.edu> Date: Wed, 21 Aug 2024 23:44:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Paul Eggert References: <01f0f261-60af-4282-ae1b-9f3c4e8b2ed3@cs.ucla.edu> <73642c93-86a3-4ec1-a5ce-1d69bf2704d1@cs.ucla.edu> Content-Language: en-US Organization: UCLA Computer Science Department In-Reply-To: <73642c93-86a3-4ec1-a5ce-1d69bf2704d1@cs.ucla.edu> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --------------WNC7tpPsUqdi3mP5u04W0Pab Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit GCC bug 58416 has been fixed, and the fix should appear in in the forthcoming GCC 15. I installed the attached patch into GNU Emacs, so that Emacs no longer attempts to work around the bug if GCC 15+ is being used. --------------WNC7tpPsUqdi3mP5u04W0Pab Content-Type: text/x-patch; charset=UTF-8; name="0001-GCC-bug-58416-is-fixed-in-GCC-15.patch" Content-Disposition: attachment; filename="0001-GCC-bug-58416-is-fixed-in-GCC-15.patch" Content-Transfer-Encoding: base64 RnJvbSAzZDFkNGYxMDllZDQxMTUyNTZhMDhjNzRlZWI3MDQyNTlkOTFjOWY0IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBXZWQsIDIxIEF1ZyAyMDI0IDIzOjM2OjQ1IC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gR0NDIGJ1ZyA1ODQxNiBpcyBmaXhlZCBpbiBHQ0MgMTUKTUlNRS1WZXJzaW9uOiAxLjAK Q29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04CkNvbnRlbnQtVHJhbnNm ZXItRW5jb2Rpbmc6IDhiaXQKCiogY29uZmlndXJlLmFjIChlbWFjc19jdl9nY2NfYnVnXzU4 NDE2X0NGTEFHUyk6Ck5vIG5lZWQgZm9yIGEgd29ya2Fyb3VuZCBpbiBHQ0MgMTUuCgoyMDI0 LTA4LTE5ICBQYXVsIEVnZ2VydCAgPGVnZ2VydEBjcy51Y2xhLmVkdT4KClJlbW92ZSBvYnNv bGV0ZSBjb21t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