From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John David Anglin Newsgroups: gmane.lisp.guile.bugs Subject: bug#45214: guile segfaults on 32-bit big-endian targets Date: Sat, 12 Dec 2020 17:00:32 -0500 Message-ID: <1c389d72-cbb7-888f-f1c1-d33fa2a1248b@bell.net> References: <56553e87-ec27-d287-9e5b-fc501bc4b2dc@physik.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31227"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 Cc: Helge Deller , Michael Karcher , Andreas Schwab To: glaubitz@physik.fu-berlin.de, 45214@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Dec 12 23:01:11 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 1koCww-00083K-KH for guile-bugs@m.gmane-mx.org; Sat, 12 Dec 2020 23:01:10 +0100 Original-Received: from localhost ([::1]:60234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koCwv-0008RR-Mp for guile-bugs@m.gmane-mx.org; Sat, 12 Dec 2020 17:01:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koCwo-0008RH-7A for bug-guile@gnu.org; Sat, 12 Dec 2020 17:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koCwn-0002Yi-Qy for bug-guile@gnu.org; Sat, 12 Dec 2020 17:01:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koCwn-0008QD-PY for bug-guile@gnu.org; Sat, 12 Dec 2020 17:01:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: John David Anglin Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 12 Dec 2020 22:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45214 X-GNU-PR-Package: guile X-Debbugs-Original-To: John Paul Adrian Glaubitz , bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160781043932332 (code B ref -1); Sat, 12 Dec 2020 22:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Dec 2020 22:00:39 +0000 Original-Received: from localhost ([127.0.0.1]:47006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koCwQ-0008PQ-Hu for submit@debbugs.gnu.org; Sat, 12 Dec 2020 17:00:38 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koCwO-0008PG-Ra for submit@debbugs.gnu.org; Sat, 12 Dec 2020 17:00:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koCwO-0008Kr-Fr for bug-guile@gnu.org; Sat, 12 Dec 2020 17:00:36 -0500 Original-Received: from belmont79srvr.owm.bell.net ([184.150.200.79]:58402 helo=mtlfep01.bell.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1koCwL-0002Kp-70 for bug-guile@gnu.org; Sat, 12 Dec 2020 17:00:36 -0500 Original-Received: from bell.net mtlfep01 184.150.200.30 by mtlfep01.bell.net with ESMTP id <20201212220031.ZEEU120733.mtlfep01.bell.net@mtlspm01.bell.net> for ; Sat, 12 Dec 2020 17:00:31 -0500 Original-Received: from [192.168.2.49] (really [67.70.16.145]) by mtlspm01.bell.net with ESMTP id <20201212220031.LZJF130487.mtlspm01.bell.net@[192.168.2.49]>; Sat, 12 Dec 2020 17:00:31 -0500 In-Reply-To: <56553e87-ec27-d287-9e5b-fc501bc4b2dc@physik.fu-berlin.de> Content-Language: en-US X-CM-Analysis: v=2.4 cv=AbB0o1bG c=1 sm=1 tr=0 ts=5fd53d7f a=ch4VMz8uGZlcRCFa+4Q1bQ==:117 a=ch4VMz8uGZlcRCFa+4Q1bQ==:17 a=IkcTkHD0fZMA:10 a=zTNgK-yGK50A:10 a=mDV3o1hIAAAA:8 a=xNf9USuDAAAA:8 a=FBHGMhGWAAAA:8 a=f8NjU8KwgdAh7mAVxHcA:9 a=QEXdDO2ut3YA:10 a=x0p3um_wju8A:10 a=jYJgLHWX644A:10 a=_FVE-zBwftR9WsbkzFJk:22 a=SEwjQc04WA-l_NiBhQ7s:22 a=9gvnlMMaQFpL9xblJ6ne:22 X-CM-Envelope: MS4xfA23bVrLdfLYyjCV2a/5YG6mL+f8fAoROQdR1m+BUxtyaaSCHyWMjRzjIMPKUkyT9j8l/fEn5tRsdYEEahjBSb1429957KLxfIf64wTLM/h9SpjJeo0V lzMt9S2Su35tKSQ5uIxmTXzu7pJSdg+R+AzDysgFB5sKLXF4CaXmCydgKDHbiTD1RjBBKJsP62H8nA== Received-SPF: pass client-ip=184.150.200.79; envelope-from=dave.anglin@bell.net; helo=mtlfep01.bell.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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:9927 Archived-At: Hi, I created this debian PR earlier today: Bug#977223: Acknowledgement (guile-3.0: FTBFS on hppa - segmentation faul= ts) In the above, the segmentation fault occurs during exception handling on = hppa.=C2=A0 The exception is more or less handled on powerpc: =2E./meta/build-env=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 \ guild compile --target=3D"powerpc-unknown-linux-gnu"=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -W0 -O1=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ =C2=A0 -L "/<>/module"=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ =C2=A0 -L "/<>/guile-readline"=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 \ =C2=A0 -o "language/tree-il/compile-cps.go" "../module/language/tree-il/c= ompile-cps.scm" Backtrace: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 11 (_ # # #) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 10 (apply-smob/0 #= ) In ice-9/eval.scm: =C2=A0=C2=A0=C2=A0 657:8=C2=A0 9 (_ #(#(#f) ("prompt") # ?)) =C2=A0=C2=A0=C2=A0 619:8=C2=A0 8 (_ #(#(#))) =C2=A0=C2=A0=C2=A0 155:9=C2=A0 7 (_ #(#(# ("c= ompile" # ?)) #)) =C2=A0=C2=A0=C2=A0 619:8=C2=A0 6 (_ #(#(# # ?) ?)) =C2=A0=C2=A0=C2=A0 163:9=C2=A0 5 (_ #(#(# "p?" ?) ?)) In unknown file: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 4 (_ # # #) In system/base/target.scm: =C2=A0=C2=A0=C2=A0=C2=A0 65:6=C2=A0 3 (with-target "powerpc-unknown-linux= -gnu" #) In system/base/compile.scm: =C2=A0=C2=A0=C2=A0 187:6=C2=A0 2 (compile-file "../module/ice-9/rdelim.sc= m" #:output-file ?) =C2=A0=C2=A0=C2=A0 56:12=C2=A0 1 (call-once #) In unknown file: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 (_ # # #) ERROR: thunk may only be entered once: ~a # make[4]: *** [Makefile:1927: ice-9/rdelim.go] Error 1 Trying to bisect. Regards, Dave On 2020-12-12 4:26 p.m., John Paul Adrian Glaubitz wrote: > Hello! > > As reported in [1], guile segfaults on 32-bit big-endian targets with: > > guild compile --target=3D"hppa-unknown-linux-gnu" \ > -W0 -O1 \ > -L "/<>/module" \ > -L "/<>/guile-readline" \ > -o "language/tree-il/eta-expand.go" "../module/language/tree-il/eta-e= xpand.scm" > make[4]: *** [Makefile:1927: language/tree-il/eta-expand.go] Segmentati= on fault > make[4]: *** Waiting for unfinished jobs.... > make[4]: *** [Makefile:1927: language/tree-il/debug.go] Segmentation fa= ult > 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 e= xit status 2 > > Full build log in [2]. This affects hppa, m68k and powerpc (32-bit). > > Backtrace: > > #0 0x006e3e9c in scm_sum (x=3Dx@entry=3D0x0, y=3D0x6) at numbers.c:756= 9 > 7569 else if (SCM_BIGP (x)) > [Current thread is 1 (Thread 0xf7c34480 (LWP 529732))] > (gdb) bt > #0 0x006e3e9c in scm_sum (x=3Dx@entry=3D0x0, y=3D0x6) at numbers.c:756= 9 > #1 0x006cd498 in add_immediate (a=3D0x0, b=3D) at intri= nsics.c:80 > #2 0x00749818 in vm_regular_engine (thread=3D0xf7971e00) at vm-engine.= c:1583 > #3 0x0074c2f4 in scm_call_n (proc=3Dproc@entry=3D0xeffbf148, argv=3Dar= gv@entry=3D0x0,=20 > nargs=3Dnargs@entry=3D0) at vm.c:1608 > #4 0x006a70fc in scm_call_0 (proc=3Dproc@entry=3D0xeffbf148) at eval.c= :490 > #5 0x006d39d8 in scm_primitive_load_path (args=3D) at l= oad.c:1259 > #6 0x006d3f28 in scm_c_primitive_load_path (filename=3Dfilename@entry=3D= 0x776458=20 > "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=3Dbase@entry=3D0xffecfb18) at = init.c:505 > #9 0x0073b858 in scm_i_init_thread_for_guile (base=3Dbase@entry=3D0xff= ecfb18,=20 > dynamic_state=3Ddynamic_state@entry=3D0x0) at threads.c:570 > #10 0x0073ba1c in scm_i_init_thread_for_guile (dynamic_state=3D0x0,=20 > base=3D0xffecfb18) at threads.c:677 > #11 with_guile (base=3D0xffecfb18, data=3D0xffecfb38) at threads.c:638 > #12 0x003e17e4 in GC_call_with_stack_base () from=20 > /usr/lib/powerpc-linux-gnu/libgc.so.1 > #13 0x0073bfb8 in scm_i_with_guile (dynamic_state=3D,=20 > data=3D0xffecfb28, func=3D0x6c90c0 ) at threads.c:688= > #14 scm_with_guile (func=3Dfunc@entry=3D0x6c90c0 ,=20 > data=3Ddata@entry=3D0xffecfb58) at threads.c:694 > #15 0x006c93c8 in scm_boot_guile (argc=3Dargc@entry=3D16,=20 > argv=3Dargv@entry=3D0xffecfe14, main_func=3Dmain_func@entry=3D0x800950 = ,=20 > closure=3Dclosure@entry=3D0x0) at init.c:290 > #16 0x00800754 in main (argc=3D16, argv=3D0xffecfe14) at guile.c:95 > (gdb) > > I assume the crash has got something to do how values are packed and un= packed > 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 runnin= g 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.ht= ml >> [2] https://buildd.debian.org/status/fetch.php?pkg=3Dguile-3.0&arch=3D= hppa&ver=3D3.0.4-3&stamp=3D1607546304&raw=3D0 >> [3] https://gcc.gnu.org/wiki/CompileFarm --=20 John David Anglin dave.anglin@bell.net