From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Paul Adrian Glaubitz Newsgroups: gmane.lisp.guile.bugs Subject: bug#45214: guile segfaults on 32-bit big-endian targets Date: Sat, 12 Dec 2020 22:26:07 +0100 Message-ID: <56553e87-ec27-d287-9e5b-fc501bc4b2dc@physik.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10581"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 Cc: Helge Deller , John David Anglin , Andreas Schwab , Michael Karcher To: 45214@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Dec 12 22:27:19 2020 Return-path: Envelope-to: guile-bugs@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 1koCQA-0002cB-KV for guile-bugs@m.gmane-mx.org; Sat, 12 Dec 2020 22:27:18 +0100 Original-Received: from localhost ([::1]:57048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koCQ9-0001nM-LO for guile-bugs@m.gmane-mx.org; Sat, 12 Dec 2020 16:27:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koCPu-0001md-8d for bug-guile@gnu.org; Sat, 12 Dec 2020 16:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koCPu-0007ep-1m for bug-guile@gnu.org; Sat, 12 Dec 2020 16:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koCPt-0007Ty-U3 for bug-guile@gnu.org; Sat, 12 Dec 2020 16:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: John Paul Adrian Glaubitz Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 12 Dec 2020 21:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45214 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160780837928700 (code B ref -1); Sat, 12 Dec 2020 21:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Dec 2020 21:26:19 +0000 Original-Received: from localhost ([127.0.0.1]:46963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koCPD-0007Sq-4L for submit@debbugs.gnu.org; Sat, 12 Dec 2020 16:26:19 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:49748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koCPB-0007Si-18 for submit@debbugs.gnu.org; Sat, 12 Dec 2020 16:26:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koCPA-00019o-QD for bug-guile@gnu.org; Sat, 12 Dec 2020 16:26:16 -0500 Original-Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:59087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koCP6-0007Ia-F5 for bug-guile@gnu.org; Sat, 12 Dec 2020 16:26:16 -0500 Original-Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1koCP2-001UMq-SI; Sat, 12 Dec 2020 22:26:08 +0100 Original-Received: from p5b13ae73.dip0.t-ipconnect.de ([91.19.174.115] helo=[192.168.178.139]) by inpost2.zedat.fu-berlin.de (Exim 4.94) with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (envelope-from ) id 1koCP2-0025Rf-GP; Sat, 12 Dec 2020 22:26:08 +0100 Content-Language: en-US X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 91.19.174.115 Received-SPF: pass client-ip=130.133.4.66; envelope-from=glaubitz@zedat.fu-berlin.de; helo=outpost1.zedat.fu-berlin.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9926 Archived-At: Hello! As reported in [1], guile segfaults on 32-bit big-endian targets with: guild compile --target="hppa-unknown-linux-gnu" \ -W0 -O1 \ -L "/<>/module" \ -L "/<>/guile-readline" \ -o "language/tree-il/eta-expand.go" "../module/language/tree-il/eta-expand.scm" make[4]: *** [Makefile:1927: language/tree-il/eta-expand.go] Segmentation fault make[4]: *** Waiting for unfinished jobs.... make[4]: *** [Makefile:1927: language/tree-il/debug.go] Segmentation fault make[4]: *** [Makefile:1927: language/tree-il/analyze.go] Segmentation fault still going make[4]: *** [Makefile:1927: language/tree-il/effects.go] Segmentation fault make[4]: Leaving directory '/<>/bootstrap' make[3]: *** [Makefile:1851: all-recursive] Error 1 make[3]: Leaving directory '/<>' make[2]: *** [Makefile:1737: all] Error 2 make[2]: Leaving directory '/<>' make[1]: *** [debian/rules:192: override_dh_auto_build] Error 2 make[1]: Leaving directory '/<>' make: *** [debian/rules:104: build-arch] Error 2 dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2 Full build log in [2]. This affects hppa, m68k and powerpc (32-bit). Backtrace: #0 0x006e3e9c in scm_sum (x=x@entry=0x0, y=0x6) at numbers.c:7569 7569 else if (SCM_BIGP (x)) [Current thread is 1 (Thread 0xf7c34480 (LWP 529732))] (gdb) bt #0 0x006e3e9c in scm_sum (x=x@entry=0x0, y=0x6) at numbers.c:7569 #1 0x006cd498 in add_immediate (a=0x0, b=) at intrinsics.c:80 #2 0x00749818 in vm_regular_engine (thread=0xf7971e00) at vm-engine.c:1583 #3 0x0074c2f4 in scm_call_n (proc=proc@entry=0xeffbf148, argv=argv@entry=0x0, nargs=nargs@entry=0) at vm.c:1608 #4 0x006a70fc in scm_call_0 (proc=proc@entry=0xeffbf148) at eval.c:490 #5 0x006d39d8 in scm_primitive_load_path (args=) at load.c:1259 #6 0x006d3f28 in scm_c_primitive_load_path (filename=filename@entry=0x776458 "ice-9/boot-9") at load.c:1275 #7 0x006c9310 in scm_load_startup_files () at init.c:222 #8 0x006c96a8 in scm_i_init_guile (base=base@entry=0xffecfb18) at init.c:505 #9 0x0073b858 in scm_i_init_thread_for_guile (base=base@entry=0xffecfb18, dynamic_state=dynamic_state@entry=0x0) at threads.c:570 #10 0x0073ba1c in scm_i_init_thread_for_guile (dynamic_state=0x0, base=0xffecfb18) at threads.c:677 #11 with_guile (base=0xffecfb18, data=0xffecfb38) at threads.c:638 #12 0x003e17e4 in GC_call_with_stack_base () from /usr/lib/powerpc-linux-gnu/libgc.so.1 #13 0x0073bfb8 in scm_i_with_guile (dynamic_state=, data=0xffecfb28, func=0x6c90c0 ) at threads.c:688 #14 scm_with_guile (func=func@entry=0x6c90c0 , data=data@entry=0xffecfb58) at threads.c:694 #15 0x006c93c8 in scm_boot_guile (argc=argc@entry=16, argv=argv@entry=0xffecfe14, main_func=main_func@entry=0x800950 , closure=closure@entry=0x0) at init.c:290 #16 0x00800754 in main (argc=16, argv=0xffecfe14) at guile.c:95 (gdb) I assume the crash has got something to do how values are packed and unpacked into the SCM object type. I have not been able to find the problem yet myself, unfortunately which is why I am reporting this issue here. For anyone willing to debug this, access to a fast POWER machine running a big-endian Debian unstable can be obtained through the GCC compile farm [3]. Thanks, Adrian > [1] https://lists.gnu.org/archive/html/guile-devel/2020-12/msg00003.html > [2] https://buildd.debian.org/status/fetch.php?pkg=guile-3.0&arch=hppa&ver=3.0.4-3&stamp=1607546304&raw=0 > [3] https://gcc.gnu.org/wiki/CompileFarm -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaubitz@debian.org `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913