From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Sergei Trofimovich Newsgroups: gmane.lisp.guile.bugs Subject: bug#38772: guile-2.2.6 'prebuilt/32-bit-big-endian' prebuilt bytecode is invalid Date: Sat, 28 Dec 2019 11:24:46 +0000 Message-ID: <20191228112446.7c82796e@sf> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="113050"; mail-complaints-to="usenet@blaine.gmane.org" To: 38772@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Dec 28 12:25:11 2019 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ilADX-000TCh-3G for guile-bugs@m.gmane.org; Sat, 28 Dec 2019 12:25:11 +0100 Original-Received: from localhost ([::1]:42628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilADV-0001w5-MF for guile-bugs@m.gmane.org; Sat, 28 Dec 2019 06:25:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56570) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilADP-0001vz-Um for bug-guile@gnu.org; Sat, 28 Dec 2019 06:25:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilADO-0007Ao-DP for bug-guile@gnu.org; Sat, 28 Dec 2019 06:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilADO-0007AG-1E for bug-guile@gnu.org; Sat, 28 Dec 2019 06:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ilADN-0001X4-Pl for bug-guile@gnu.org; Sat, 28 Dec 2019 06:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sergei Trofimovich Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 28 Dec 2019 11:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38772 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15775322985860 (code B ref -1); Sat, 28 Dec 2019 11:25:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Dec 2019 11:24:58 +0000 Original-Received: from localhost ([127.0.0.1]:57995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilADK-0001WR-GL for submit@debbugs.gnu.org; Sat, 28 Dec 2019 06:24:58 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:52983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilADI-0001WJ-Jz for submit@debbugs.gnu.org; Sat, 28 Dec 2019 06:24:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54908) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilADH-0001ud-BB for bug-guile@gnu.org; Sat, 28 Dec 2019 06:24:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilADF-0006fX-DP for bug-guile@gnu.org; Sat, 28 Dec 2019 06:24:54 -0500 Original-Received: from smtp.gentoo.org ([140.211.166.183]:52998) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilADF-0006VQ-55 for bug-guile@gnu.org; Sat, 28 Dec 2019 06:24:53 -0500 Original-Received: from sf (tunnel547699-pt.tunnel.tserv1.lon2.ipv6.he.net [IPv6:2001:470:1f1c:3e6::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id CE04A34DC44 for ; Sat, 28 Dec 2019 11:24:49 +0000 (UTC) X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9495 Archived-At: In https://bugs.gentoo.org/676468 Gentoo found out that guile-2.26 release fails to build on 32-bit BE targets: - powerpc-unknown-linux-gnu - sparc-unknown-linux-gnu - hppa-unknown-linux-gnu The symptom is a SIGSEGV: https://bugs.gentoo.org/676468#c10 The workaround is to delete 'prebuilt/32-bit-big-endian' to regenerate it locally. After bytecode is rebuilt we can verify that original bytecode does not look valid: guile-2.2.3 $ meta/build-env guile -c '((@ (system vm disassembler) disassemble-file) "= prebuilt/32-bit-big-endian.broken/system/foreign.go")' Disassembly of at #x98: Backtrace: 9 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 8 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 7 (_ #(#(#))) In ice-9/command-line.scm: 181:18 6 (_ #) In unknown file: 5 (eval ((@ (system vm disassembler) disassemble-file) #) #) In system/vm/disassembler.scm: 464:4 4 (disassemble-image _ _) In system/vm/debug.scm: 121:17 3 (for-each-elf-symbol _ #) In system/vm/disassembler.scm: 475:9 2 (_ _) 338:16 1 (disassemble-buffer # # 38 # =E2=80= =A6) 291:14 0 (compute-labels #vu8(127 69 76 70 1 2 1 255 0 0 0 0 0 =E2=80= =A6) =E2=80=A6) system/vm/disassembler.scm:291:14: In procedure compute-labels: In procedure vector-ref: Value out of range: 3678 I see 2 problems here: 1. 32-bit BE bytecode seems to be invalid. How does it get generated? Via c= ross-compilation? 2. guile does not validate bytecode when executes it (at least by default) = and just SIGSEGVs. --=20 Sergei