From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 26 10:04:40 2020 Received: (at submit) by debbugs.gnu.org; 26 Jun 2020 14:04:40 +0000 Received: from localhost ([127.0.0.1]:42925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jooy8-0002lP-5N for submit@debbugs.gnu.org; Fri, 26 Jun 2020 10:04:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:57486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jooy5-0002lH-Fn for submit@debbugs.gnu.org; Fri, 26 Jun 2020 10:04:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jooy5-0006Tb-8z for bug-guile@gnu.org; Fri, 26 Jun 2020 10:04:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39808) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jooy4-0004rW-VG for bug-guile@gnu.org; Fri, 26 Jun 2020 10:04:36 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35590 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jooy4-0004b6-IV for bug-guile@gnu.org; Fri, 26 Jun 2020 10:04:36 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: bug-guile@gnu.org Subject: [3.0.4] Incorrect =?utf-8?B?4oCYZXF2P+KAmQ==?= reduction in =?utf-8?Q?64=E2=86=9232-bit?= cross-compilation X-Debbugs-Cc: "Jan (janneke) Nieuwenhuizen" X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Messidor an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 26 Jun 2020 16:04:34 +0200 Message-ID: <87zh8pncst.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.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: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, In , janneke found that cross-compiling an =E2=80=98eqv?=E2=80=99 form from x86_64 to i686 leads to= an incorrect =E2=80=98eqv?=E2=80=99 reduction (this was not the case in 3.0.2). Reprodu= cer: (lambda (i) (eqv? i #x6478696f)) Then cross-compile from x86_64 like this: guild compile -O3 --target=3Di586-pc-gnu -o bad.go reproducer.scm and compile natively on a 32-bit platform with: guild compile -O3 -o good.go reproducer.scm If you disassemble good.go and bad.go, the diff goes like this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- /tmp/good.asm 2020-06-26 15:56:35.671024432 +0200 +++ /tmp/bad.asm 2020-06-26 15:56:35.651024548 +0200 @@ -1,55 +1,39 @@ Disassembly of at #x98: - 0 (instrument-entry 16348) at eqv-reduction-bug.scm:1:0 + 0 (instrument-entry 16348) at /home/ludo/src/guile-debugging/eqv-reduction-bug.scm:1:0 2 (assert-nargs-ee/locals 1 0) ;; 1 slot (0 args) - 3 (make-non-immediate 0 16343) ;; # + 3 (make-non-immediate 0 16343) ;; # 5 (handle-interrupts) 6 (return-values) Disassembly of at #xb4: - 0 (instrument-entry 16351) at eqv-reduction-bug.scm:1:0 + 0 (instrument-entry 16351) at /home/ludo/src/guile-debugging/eqv-reduction-bug.scm:1:0 2 (assert-nargs-ee/locals 2 0) ;; 2 slots (1 arg) 3 (static-ref 1 16346) ;; 1685612911 - 5 (eq? 0 1) at eqv-reduction-bug.scm:2:2 - 6 (je 21) ;; -> L3 - 7 (immediate-tag=? 0 7 0) ;; heap-object? - 9 (jne 14) ;; -> L2 - 10 (heap-tag=? 0 127 23) ;; heap-number? - 12 (jne 11) ;; -> L2 - 13 (heap-numbers-equal? 0 1) - 14 (jne 5) ;; -> L1 - 15 (make-short-immediate 1 1028) ;; #t - 16 (reset-frame 1) ;; 1 slot - 17 (handle-interrupts) - 18 (return-values) + 5 (eq? 0 1) at /home/ludo/src/guile-debugging/eqv-reduction-bug.scm:2:2 + 6 (jne 5) ;; -> L1 + 7 (make-short-immediate 1 1028) ;; #t + 8 (reset-frame 1) ;; 1 slot + 9 (handle-interrupts) + 10 (return-values) L1: - 19 (make-short-immediate 1 4) ;; #f - 20 (reset-frame 1) ;; 1 slot - 21 (handle-interrupts) - 22 (return-values) -L2: - 23 (make-short-immediate 1 4) ;; #f - 24 (reset-frame 1) ;; 1 slot - 25 (handle-interrupts) - 26 (return-values) -L3: - 27 (make-short-immediate 1 1028) ;; #t - 28 (reset-frame 1) ;; 1 slot - 29 (handle-interrupts) - 30 (return-values) + 11 (make-short-immediate 1 4) ;; #f + 12 (reset-frame 1) ;; 1 slot + 13 (handle-interrupts) + 14 (return-values) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable IOW, bad.go reduced =E2=80=98eqv?=E2=80=99 to =E2=80=98eq?=E2=80=99. This might come from 7df3f3414bfb19a1bd7fbe29bc30a1ab28bf4319, perhaps with an issue of the time at which =E2=80=98target-most-positive-fixnum=E2= =80=99 is called, similar to what was fixed in a0b9d866380b04aff27dcbcf1e13051f3d9685ad. To be continued=E2=80=A6 Ludo=E2=80=99. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 26 11:45:43 2020 Received: (at control) by debbugs.gnu.org; 26 Jun 2020 15:45:43 +0000 Received: from localhost ([127.0.0.1]:42962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joqXv-0005Cx-0s for submit@debbugs.gnu.org; Fri, 26 Jun 2020 11:45:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joqXr-0005Cj-Re for control@debbugs.gnu.org; Fri, 26 Jun 2020 11:45:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41324) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joqXm-0006Kc-HZ for control@debbugs.gnu.org; Fri, 26 Jun 2020 11:45:34 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35708 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1joqXl-0000Rj-MY for control@debbugs.gnu.org; Fri, 26 Jun 2020 11:45:34 -0400 Date: Fri, 26 Jun 2020 17:45:30 +0200 Message-Id: <87v9jdn84l.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #42060 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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: -3.3 (---) severity 42060 important quit