From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#39954: [3.0.0] =?UTF-8?Q?=E2=80=98frame-local-ref=E2=80=99?= returns (SCM)0x0 Date: Fri, 06 Mar 2020 17:05:04 +0100 Message-ID: <87wo7xlb9r.fsf@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="113597"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: 39954@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Mar 06 17:06: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 1jAFUJ-000TNQ-A7 for guile-bugs@m.gmane-mx.org; Fri, 06 Mar 2020 17:06:11 +0100 Original-Received: from localhost ([::1]:38572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAFUI-0004hT-8v for guile-bugs@m.gmane-mx.org; Fri, 06 Mar 2020 11:06:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41683) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAFUC-0004de-8C for bug-guile@gnu.org; Fri, 06 Mar 2020 11:06:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAFUA-0005ro-FE for bug-guile@gnu.org; Fri, 06 Mar 2020 11:06:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39810) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAFUA-0005rH-Ag for bug-guile@gnu.org; Fri, 06 Mar 2020 11:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jAFUA-0000Ji-1R for bug-guile@gnu.org; Fri, 06 Mar 2020 11:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 06 Mar 2020 16:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39954 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15835107141150 (code B ref -1); Fri, 06 Mar 2020 16:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Mar 2020 16:05:14 +0000 Original-Received: from localhost ([127.0.0.1]:45780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAFTN-0000IT-Ns for submit@debbugs.gnu.org; Fri, 06 Mar 2020 11:05:14 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:52588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAFTL-0000IL-JV for submit@debbugs.gnu.org; Fri, 06 Mar 2020 11:05:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41109) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAFTI-0004MY-KY for bug-guile@gnu.org; Fri, 06 Mar 2020 11:05:11 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jAFTI-0003VH-H0 for bug-guile@gnu.org; Fri, 06 Mar 2020 11:05:08 -0500 Original-Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60308 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jAFTH-0000MF-DM for bug-guile@gnu.org; Fri, 06 Mar 2020 11:05:08 -0500 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 =?UTF-8?Q?Vent=C3=B4se?= 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9614 Archived-At: The example below leads to a Guile 3.0.0 segfault while trying to display a backtrace from the evaluator: --8<---------------cut here---------------start------------->8--- $ cat ~/src/guile-debugging/scm_is_values-abort.scm (use-modules (ice-9 time)) (time (ash 1 #;(expt 2 82) 4835703278458516698824704)) $ guile ~/src/guile-debugging/scm_is_values-abort.scm ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/ludo/src/guile-debugging/scm_is_values-abort.scm ;;; WARNING: compilation of /home/ludo/src/guile-debugging/scm_is_values-ab= ort.scm failed: ;;; In procedure bytevector-u32-native-set!: Argument 3 out of range: 11258= 99906842624 Backtrace: 3 (primitive-load "/home/ludo/src/guile-debugging/scm_is_values-= abort.scm") In ice-9/time.scm: 38:18 2 (time-proc #) In unknown file: Adres-eraro(nekropsio el=C5=9Dutita) $ gdb $(which guile) core [...] Core was generated by `guile /home/ludo/src/guile-debugging/scm_is_values-a= bort.scm'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007faa1d3e4d74 in scm_is_values (x=3D0x0) at values.h:30 30 values.h: Dosiero a=C5=AD dosierujo ne ekzistas. [Current thread is 1 (Thread 0x7faa1ccf9b80 (LWP 9971))] ERROR: In procedure type-pointer: ERROR: In procedure gdbscm_type_pointer: Wrong type argument in position 1 = (expecting gdb:type): #f Error while executing Scheme code.(gdb) bt #0 0x00007faa1d3e4d74 in scm_is_values ( x=3D0x0) at values.h:30 #1 vm_regular_engine (thread=3D0x7faa1c9d5d80) at vm-engine.c:974 #2 0x00007faa1d3e61a5 in scm_call_n (proc=3D, argv=3Dargv@e= ntry=3D0x7ffcac33bf40, nargs=3Dnargs@entry=3D4) at vm.c:1589 #3 0x00007faa1d3620d4 in scm_call_4 (proc=3D, arg1=3Darg1@e= ntry=3D"#" =3D {...},=20 arg2=3Darg2@entry=3D# 7faa1acac3c0>= , arg3=3Darg3@entry=3D#:count,=20 arg4=3Darg4@entry=3D20) at eval.c:517 #4 0x00007faa1d3555f9 in display_backtrace_body (a=3D) at b= acktrace.c:239 #5 0x00007faa1d36387a in scm_c_with_exception_handler (type=3Dtype@entry= =3D#t,=20 handler=3Dhandler@entry=3D0x7faa1d3db630 ,=20 handler_data=3Dhandler_data@entry=3D0x7ffcac33c0f0, thunk=3Dthunk@entry= =3D0x7faa1d3db770 ,=20 thunk_data=3Dthunk_data@entry=3D0x7ffcac33c0f0) at exceptions.c:170 #6 0x00007faa1d3db96d in scm_c_catch (tag=3Dtag@entry=3D#t, body=3Dbody@en= try=3D0x7faa1d3554d0 ,=20 body_data=3Dbody_data@entry=3D0x7ffcac33c160, handler=3Dhandler@entry= =3D0x7faa1d3558b0 ,=20 handler_data=3Dhandler_data@entry=3D0x7faa1acac3c0, pre_unwind_handler= =3Dpre_unwind_handler@entry=3D0x0,=20 pre_unwind_handler_data=3D0x0) at throw.c:168 #7 0x00007faa1d3db98e in scm_internal_catch (tag=3Dtag@entry=3D#t,=20 body=3Dbody@entry=3D0x7faa1d3554d0 , body_data= =3Dbody_data@entry=3D0x7ffcac33c160,=20 handler=3Dhandler@entry=3D0x7faa1d3558b0 , hand= ler_data=3Dhandler_data@entry=3D0x7faa1acac3c0) at throw.c:177 #8 0x00007faa1d3554c5 in scm_display_backtrace_with_highlights (stack=3Dst= ack@entry=3D"#" =3D {...},=20 port=3Dport@entry=3D# 7faa1acac3c0>= , first=3Dfirst@entry=3D#f,=20 depth=3Ddepth@entry=3D#f, highlights=3Dhighlights@entry=3D()) at backtr= ace.c:277 #9 0x00007faa1d35e01f in print_exception_and_backtrace ( args=3D(#f "Value out of range ~S to ~S: ~S" (0 # = #) (#)), tag=3Dout-of-range, port= =3D# 7faa1acac3c0>) at continuations.c:= 409 #10 pre_unwind_handler (error_port=3D0x7faa1acac3c0, tag=3Dout-of-range,=20 args=3D(#f "Value out of range ~S to ~S: ~S" (0 # = #) (#))) at continuations.c:453 #11 0x00007faa1d3db6eb in catch_pre_unwind_handler (data=3D0x7ffcac33cb90,= =20 exn=3D"#" =3D {...}) at throw.c:135 #12 0x00007faa1d3e4d6c in vm_regular_engine (thread=3D0x7faa1c9d5d80) at vm= -engine.c:972 #13 0x00007faa1d3e61a5 in scm_call_n (proc=3Dproc@entry=3D#, argv=3D, nargs=3D5) at vm.c:1589 #14 0x00007faa1d3623d4 in scm_apply_0 (proc=3D#, args= =3D()) at eval.c:603 #15 0x00007faa1d36307d in scm_apply_1 (proc=3D, arg1=3Darg1@= entry=3Dout-of-range,=20 args=3Dargs@entry=3D(#f "Value out of range ~S to ~S: ~S" (0 # #) (#))) at eval.c:6= 09 #16 0x00007faa1d3dbb29 in scm_throw (key=3Dkey@entry=3Dout-of-range,=20 args=3D(#f "Value out of range ~S to ~S: ~S" (0 # = #) (#))) at throw.c:262 #17 0x00007faa1d3dbc79 in scm_ithrow (key=3Dkey@entry=3Dout-of-range, args= =3D,=20 no_return=3Dno_return@entry=3D1) at throw.c:457 #18 0x00007faa1d360585 in scm_error_scm (key=3Dkey@entry=3Dout-of-range, su= br=3D,=20 message=3Dmessage@entry=3D"Value out of range ~S to ~S: ~S",=20 args=3Dargs@entry=3D(0 # #), = data=3Ddata@entry=3D(#)) at error.c:90 #19 0x00007faa1d36061f in scm_error (key=3Dout-of-range, subr=3Dsubr@entry= =3D0x0,=20 message=3Dmessage@entry=3D0x7faa1d4010f0 "Value out of range ~S to ~S: = ~S",=20 args=3D(0 # #), rest=3Drest@e= ntry=3D(#)) at error.c:62 #20 0x00007faa1d393d87 in scm_i_range_error (bad_val=3Dbad_val@entry=3D#, min=3D0,=20 max=3Dmax@entry=3D#) at numbers.c:9764 #21 0x00007faa1d39cd13 in scm_to_uint64 (val=3D#) at c= onv-uinteger.i.c:38 #22 0x00007faa1d3e4882 in vm_regular_engine (thread=3D0x7faa1c9d5d80) at vm= -engine.c:1533 #23 0x00007faa1d3e61a5 in scm_call_n (proc=3D, argv=3Dargv@e= ntry=3D0x7ffcac33c648, nargs=3Dnargs@entry=3D1) at vm.c:1589 #24 0x00007faa1d3631e7 in scm_primitive_eval (exp=3D) at eva= l.c:671 #25 0x00007faa1d38c30b in scm_primitive_load (filename=3D) a= t load.c:131 #26 0x00007faa1d3e4d6c in vm_regular_engine (thread=3D0x7faa1c9d5d80) at vm= -engine.c:972 #27 0x00007faa1d3e61a5 in scm_call_n (proc=3D, argv=3Dargv@e= ntry=3D0x7ffcac33c818, nargs=3Dnargs@entry=3D1) at vm.c:1589 #28 0x00007faa1d3631e7 in scm_primitive_eval (exp=3D,=20 exp@entry=3D((@ (ice-9 control) %) (begin ((@@ (ice-9 command-line) loa= d/lang) "/home/ludo/src/guile-debugging/scm_is_values-abort.scm") (quit))))= at eval.c:671 #29 0x00007faa1d363243 in scm_eval ( exp=3D((@ (ice-9 control) %) (begin ((@@ (ice-9 command-line) load/lang= ) "/home/ludo/src/guile-debugging/scm_is_values-abort.scm") (quit))), modul= e_or_state=3Dmodule_or_state@entry=3D"#" =3D {...}) at eval.= c:705 #30 0x00007faa1d3bc130 in scm_shell (argc=3D2, argv=3D0x7ffcac33ce78) at sc= ript.c:357 #31 0x00007faa1d37ab4d in invoke_main_func (body_data=3D0x7ffcac33cd20) at = init.c:308 #32 0x00007faa1d35de3a in c_body (d=3D0x7ffcac33cc60) at continuations.c:430 #33 0x00007faa1d3e4d6c in vm_regular_engine (thread=3D0x7faa1c9d5d80) at vm= -engine.c:972 #34 0x00007faa1d3e61a5 in scm_call_n (proc=3D, argv=3Dargv@e= ntry=3D0x7ffcac33ca20, nargs=3Dnargs@entry=3D2) at vm.c:1589 #35 0x00007faa1d36207a in scm_call_2 (proc=3D, arg1=3D, arg2=3D) at eval.c:503 #36 0x00007faa1d36387a in scm_c_with_exception_handler (type=3Dtype@entry= =3D#t,=20 handler=3Dhandler@entry=3D0x7faa1d3db630 ,=20 handler_data=3Dhandler_data@entry=3D0x7ffcac33cb90, thunk=3Dthunk@entry= =3D0x7faa1d3db770 ,=20 thunk_data=3Dthunk_data@entry=3D0x7ffcac33cb90) at exceptions.c:170 #37 0x00007faa1d3db96d in scm_c_catch (tag=3Dtag@entry=3D#t, body=3Dbody@en= try=3D0x7faa1d35de30 ,=20 body_data=3Dbody_data@entry=3D0x7ffcac33cc60, handler=3Dhandler@entry= =3D0x7faa1d35e0d0 ,=20 handler_data=3Dhandler_data@entry=3D0x7ffcac33cc60,=20 pre_unwind_handler=3Dpre_unwind_handler@entry=3D0x7faa1d35df30 ,=20 pre_unwind_handler_data=3D0x7faa1acac3c0) at throw.c:168 #38 0x00007faa1d35e3e3 in scm_i_with_continuation_barrier (body=3Dbody@entr= y=3D0x7faa1d35de30 ,=20 body_data=3Dbody_data@entry=3D0x7ffcac33cc60, handler=3Dhandler@entry= =3D0x7faa1d35e0d0 ,=20 handler_data=3Dhandler_data@entry=3D0x7ffcac33cc60,=20 pre_unwind_handler=3Dpre_unwind_handler@entry=3D0x7faa1d35df30 ,=20 pre_unwind_handler_data=3D0x7faa1acac3c0) at continuations.c:368 #39 0x00007faa1d35e475 in scm_c_with_continuation_barrier (func=3D, data=3D) at continuations.c:464 #40 0x00007faa1d3da40f in with_guile (base=3D0x7ffcac33ccc8, data=3D0x7ffca= c33ccf0) at threads.c:645 #41 0x00007faa1d2bfa68 in GC_call_with_stack_base () from /gnu/store/3xs3dnc28p9fi8in7hkfcdx20incrdvq-libgc-7.6.12/lib/libgc.= so.1 #42 0x00007faa1d3da728 in scm_i_with_guile (dynamic_state=3D= , data=3Ddata@entry=3D0x7ffcac33ccf0,=20 func=3Dfunc@entry=3D0x7faa1d37ab30 ) at threads.c:688 #43 scm_with_guile (func=3Dfunc@entry=3D0x7faa1d37ab30 , = data=3Ddata@entry=3D0x7ffcac33cd20) at threads.c:694 #44 0x00007faa1d37acc2 in scm_boot_guile (argc=3Dargc@entry=3D2, argv=3Darg= v@entry=3D0x7ffcac33ce78,=20 main_func=3Dmain_func@entry=3D0x401240 , closure=3Dclosure@= entry=3D0x0) at init.c:291 #45 0x0000000000401100 in main (argc=3D2, argv=3D0x7ffcac33ce78) at guile.c= :95 --8<---------------cut here---------------end--------------->8--- I traced it to =E2=80=98frame-call-representation=E2=80=99 calling =E2=80= =98frame-local-ref=E2=80=99 via =E2=80=98application-arguments=E2=80=99, and getting (SCM)0x0 from there. Ludo=E2=80=99. PS: The =E2=80=98ash=E2=80=99 example is taken from .