From unknown Fri Jun 13 10:47:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32938 <32938@debbugs.gnu.org> To: bug#32938 <32938@debbugs.gnu.org> Subject: Status: guile 2.2.4 crashes (u8-list->bytevector (make-bytevector 32 0)) Reply-To: bug#32938 <32938@debbugs.gnu.org> Date: Fri, 13 Jun 2025 17:47:58 +0000 retitle 32938 guile 2.2.4 crashes (u8-list->bytevector (make-bytevector 32 = 0)) reassign 32938 guile submitter 32938 Josh Datko severity 32938 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 19:29:42 2018 Received: (at submit) by debbugs.gnu.org; 4 Oct 2018 23:29:42 +0000 Received: from localhost ([127.0.0.1]:37236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8D3t-0002o4-GU for submit@debbugs.gnu.org; Thu, 04 Oct 2018 19:29:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8CTP-0001mu-0U for submit@debbugs.gnu.org; Thu, 04 Oct 2018 18:51:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8CTI-0008Lw-8U for submit@debbugs.gnu.org; Thu, 04 Oct 2018 18:51:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51952) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g8CTF-0008KA-1t for submit@debbugs.gnu.org; Thu, 04 Oct 2018 18:51:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8CTD-0005d9-Md for bug-guile@gnu.org; Thu, 04 Oct 2018 18:51:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8CP3-0000qD-NJ for bug-guile@gnu.org; Thu, 04 Oct 2018 18:47:31 -0400 Received: from mail-it1-x129.google.com ([2607:f8b0:4864:20::129]:35250) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8CP3-0000mT-EV for bug-guile@gnu.org; Thu, 04 Oct 2018 18:47:29 -0400 Received: by mail-it1-x129.google.com with SMTP id p64-v6so260573itp.0 for ; Thu, 04 Oct 2018 15:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cryptotronix-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=p7v+OfGIqIbLjIYXY/0WiKD5qfMNMibf+knAFjnqxgk=; b=iw+0Q+QAoK0Sq5Jd80KXoY/gB7SeabGoiUOXcHF3zf0JBQniFbD0SZkkFZTzUfeaKO gp/eHCJIKeqwnyI2OCt5JxD1q7vpzqeqz53OppGhW+MwjCp+Z9cfALtDbcwIYmIwVdfT iYLi3krofV/HdGV6mBITX9UzR+OOCgTpMdlY7nUzK9oamwC+kgxYzKFmP2B6NIhfaGha bXozWQt80Nm9AYURnu7dhM4kj+yDrOYil7R1KGb7JVxmvRvQUg9/elIqZbSPOeN5sfuM fugzaRNKlLM3Lb4zbaEN3CPPLuf0r+ku5MvUZFCX9wWdX7inWEHuMluX6XIFaS9EJoLr BmLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=p7v+OfGIqIbLjIYXY/0WiKD5qfMNMibf+knAFjnqxgk=; b=MAx3kIROSlKGZR+5GooCmb8A5WKYaqVUAV21jNYACfoVO+5eqxZ2sTYeCPD2ml2Y/R axC4bcRmrY+s9C3xKEiGQrSR/ChUhAGkstvtZfQAfRjF9N5Ol2WNlVabhJpQDalwS274 1Wi/q9rfXcM46VP90bFDy9HA/vQHaS5cMk807R1Xr3Uzlq34eky6Lat3/2R09tqh3b2R LLwkSwC7VXWX36a8aAuUe4VUkiUJ6GsJ0GKwvyppJTz/Tv1TwjuYGKkHcp95mpSzCIoF Jho4OVZijdlEZwGe7RRtaNCsBDBKrdoXSo4Ea9yAZzN+7MqbmjhTumYzlAIWVOEBeOLm LedQ== X-Gm-Message-State: ABuFfogieFvxHZOm43v+0R849hRNRH5Sn1u30mHqJx3isBnCQPJ6/YVa dtamsFTXsX6caJeA0Tdw/8zGKdMcRiPOtQjuJCtLzXJtVqt1kg== X-Google-Smtp-Source: ACcGV61H96B/dzlPoN3Iz1LCWLx9I5UFVK5/aI4yvo8QUkUiTW4L1rYeWynDP601eweaHQ2lyWgco7XCCzkFOuE55Wo= X-Received: by 2002:a02:a087:: with SMTP id g7-v6mr6735029jah.92.1538693246570; Thu, 04 Oct 2018 15:47:26 -0700 (PDT) MIME-Version: 1.0 From: Josh Datko Date: Thu, 4 Oct 2018 16:47:14 -0600 Message-ID: Subject: guile 2.2.4 crashes (u8-list->bytevector (make-bytevector 32 0)) To: bug-guile@gnu.org Content-Type: multipart/alternative; boundary="0000000000006164dd05776ef0a6" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 04 Oct 2018 19:29:40 -0400 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: -6.0 (------) --0000000000006164dd05776ef0a6 Content-Type: text/plain; charset="UTF-8" If you try to convert a bytevector, to a bytevector, using u8-list->bytevector, guile crashes. $ guile -q GNU Guile 2.2.4 Copyright (C) 1995-2017 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (use-modules (rnrs bytevectors)) scheme@(guile-user)> (u8-list->bytevector (make-bytevector 32 0)) [1] 126190 abort (core dumped) guile -q $ build-aux/config.guess x86_64-pc-linux-gnu This was the release version of guile downloaded from the site. $ ./config.status --config <> gdb output: GNU Guile 2.2.4 Copyright (C) 1995-2017 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (use-modules (rnrs bytevectors)) scheme@(guile-user)> (u8-list->bytevector (make-bytevector 32)) Thread 1 "lt-guile" received signal SIGABRT, Aborted. 0x00007ffff74f6428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) backtrace #0 0x00007ffff74f6428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007ffff74f802a in __GI_abort () at abort.c:89 #2 0x00007ffff7ae7f72 in make_bytevector ( element_type=SCM_ARRAY_ELEMENT_TYPE_VU8, len=18446744073709551615) at bytevectors.c:213 #3 scm_u8_list_to_bytevector (lst=0xa70640) at bytevectors.c:751 #4 0x00007ffff7b67961 in vm_debug_engine (thread=0x1f3ef, vp=0x706f30, registers=0x6, resume=-145791960) at vm-engine.c:786 #5 0x00007ffff7b71802 in scm_call_n (proc=0x7ffff7fd9030, argv=argv@entry=0x7fffffffda88, nargs=nargs@entry=1) at vm.c:1257 #6 0x00007ffff7af28e7 in scm_primitive_eval (exp=exp@entry=0x7befa0) at eval.c:662 #7 0x00007ffff7af2943 in scm_eval (exp=0x7befa0, module_or_state=module_or_state@entry=0x798140) at eval.c:696 #8 0x00007ffff7b3f4f0 in scm_shell (argc=1, argv=0x7fffffffe108) at script.c:454 #9 0x00007ffff7b09cfd in invoke_main_func (body_data=0x7fffffffdfa0) at init.c:340 #10 0x00007ffff7aeb68a in c_body (d=0x7fffffffdee0) at continuations.c:422 #11 0x00007ffff7b6e78b in vm_regular_engine (thread=0x1f3ef, vp=0x706f30, registers=0x6, resume=-145791960) at vm-engine.c:786 #12 0x00007ffff7b71802 in scm_call_n (proc=proc@entry=0x6fc320, argv=argv@entry=0x0, nargs=nargs@entry=0) at vm.c:1257 #13 0x00007ffff7af1619 in scm_call_0 (proc=proc@entry=0x6fc320) at eval.c:481 #14 0x00007ffff7b60729 in catch (tag=tag@entry=0x404, thunk=0x6fc320, handler=0x6fc300, pre_unwind_handler=0x6fc2a0) at throw.c:137 #15 0x00007ffff7b60a95 in scm_catch_with_pre_unwind_handler ( key=key@entry=0x404, thunk=, handler=, pre_unwind_handler=) at throw.c:254 ---Type to continue, or q to quit--- #16 0x00007ffff7b60c4f in scm_c_catch (tag=tag@entry=0x404, body=body@entry=0x7ffff7aeb680 , body_data=body_data@entry=0x7fffffffdee0, handler=handler@entry=0x7ffff7aeb920 , handler_data=handler_data@entry=0x7fffffffdee0, pre_unwind_handler=pre_unwind_handler@entry=0x7ffff7aeb780 , pre_unwind_handler_data=0x701b60) at throw.c:377 #17 0x00007ffff7aebc90 in scm_i_with_continuation_barrier ( body=body@entry=0x7ffff7aeb680 , body_data=body_data@entry=0x7fffffffdee0, handler=handler@entry=0x7ffff7aeb920 , handler_data=handler_data@entry=0x7fffffffdee0, pre_unwind_handler=pre_unwind_handler@entry=0x7ffff7aeb780 , pre_unwind_handler_data=0x701b60) at continuations.c:360 #18 0x00007ffff7aebd75 in scm_c_with_continuation_barrier ( func=, data=) at continuations.c:456 #19 0x00007ffff7b5f1fc in with_guile (base=0x7fffffffdf40, data=0x7fffffffdf70) at threads.c:661 #20 0x00007ffff726ac62 in GC_call_with_stack_base () from /usr/lib/x86_64-linux-gnu/libgc.so.1 #21 0x00007ffff7b5f5e8 in scm_i_with_guile ( dynamic_state=, data=0x7fffffffdf70, func=0x7ffff7b09ce0 ) at threads.c:704 #22 scm_with_guile (func=func@entry=0x7ffff7b09ce0 , data=data@entry=0x7fffffffdfa0) at threads.c:710 #23 0x00007ffff7b09ec2 in scm_boot_guile (argc=argc@entry=1, argv=argv@entry=0x7fffffffe108, main_func=main_func@entry=0x400b00 , closure=closure@entry=0x0) at init.c:323 #24 0x000000000040098c in main (argc=1, argv=0x7fffffffe108) at guile.c:101 (gdb) --0000000000006164dd05776ef0a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If you try to convert a bytevector, to a bytevector, using u= 8-list->bytevector, guile crashes.

$ guile -q
GNU Guile 2.2.4
Copyright (C) 1995-2017 Free Software Fo= undation, Inc.

Guile comes with ABSOLUTELY NO WARR= ANTY; for details type `,show w'.
This program is free softwa= re, and you are welcome to redistribute it
under certain conditio= ns; type `,show c' for details.

Enter `,help&#= 39; for help.
scheme@(guile-user)> (use-modules (rnrs bytevect= ors))
scheme@(guile-user)> (u8-list->bytevector (make-bytev= ector 32 0))
[1]=C2=A0 =C2=A0 126190 abort (core dumped)=C2=A0 gu= ile -q


$ build-aux/config.gues= s=C2=A0
x86_64-pc-linux-gnu

This w= as the release version of guile downloaded from the site.

$ ./config.status --config
<<nothing>>

gdb output:

GNU= Guile 2.2.4
Copyright (C) 1995-2017 Free Software Foundation, In= c.

Guile comes with ABSOLUTELY NO WARRANTY; for de= tails type `,show w'.
This program is free software, and you = are welcome to redistribute it
under certain conditions; type `,s= how c' for details.

Enter `,help' for help= .
scheme@(guile-user)> (use-modules (rnrs bytevectors))
<= div>scheme@(guile-user)> (u8-list->bytevector (make-bytevector 32))

Thread 1 "lt-guile" received signal SIGAB= RT, Aborted.
0x00007ffff74f6428 in __GI_raise (sig=3Dsig@entry=3D= 6)
=C2=A0 =C2=A0 at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/rai= se.c: No such file or directory.
(gdb) backtrace
#0=C2= =A0 0x00007ffff74f6428 in __GI_raise (sig=3Dsig@entry=3D6)
=C2=A0= =C2=A0 at ../sysdeps/unix/sysv/linux/raise.c:54
#1=C2=A0 0x00007= ffff74f802a in __GI_abort () at abort.c:89
#2=C2=A0 0x00007ffff7a= e7f72 in make_bytevector (
=C2=A0 =C2=A0 element_type=3DSCM_ARRAY= _ELEMENT_TYPE_VU8, len=3D18446744073709551615)
=C2=A0 =C2=A0 at b= ytevectors.c:213
#3=C2=A0 scm_u8_list_to_bytevector (lst=3D0xa706= 40) at bytevectors.c:751
#4=C2=A0 0x00007ffff7b67961 in vm_debug_= engine (thread=3D0x1f3ef,=C2=A0
=C2=A0 =C2=A0 vp=3D0x706f30, regi= sters=3D0x6, resume=3D-145791960) at vm-engine.c:786
#5=C2=A0 0x0= 0007ffff7b71802 in scm_call_n (proc=3D0x7ffff7fd9030,=C2=A0
=C2= =A0 =C2=A0 argv=3Dargv@entry=3D0x7fffffffda88, nargs=3Dnargs@entry=3D1) at = vm.c:1257
#6=C2=A0 0x00007ffff7af28e7 in scm_primitive_eval (exp= =3Dexp@entry=3D0x7befa0)
=C2=A0 =C2=A0 at eval.c:662
#7= =C2=A0 0x00007ffff7af2943 in scm_eval (exp=3D0x7befa0,=C2=A0
=C2= =A0 =C2=A0 module_or_state=3Dmodule_or_state@entry=3D0x798140) at eval.c:69= 6
#8=C2=A0 0x00007ffff7b3f4f0 in scm_shell (argc=3D1, argv=3D0x7f= ffffffe108)
=C2=A0 =C2=A0 at script.c:454
#9=C2=A0 0x00= 007ffff7b09cfd in invoke_main_func (body_data=3D0x7fffffffdfa0)
= =C2=A0 =C2=A0 at init.c:340
#10 0x00007ffff7aeb68a in c_body (d= =3D0x7fffffffdee0)
=C2=A0 =C2=A0 at continuations.c:422
#11 0x00007ffff7b6e78b in vm_regular_engine (thread=3D0x1f3ef,=C2=A0
=
=C2=A0 =C2=A0 vp=3D0x706f30, registers=3D0x6, resume=3D-145791960) at = vm-engine.c:786
#12 0x00007ffff7b71802 in scm_call_n (proc=3Dproc= @entry=3D0x6fc320,=C2=A0
=C2=A0 =C2=A0 argv=3Dargv@entry=3D0x0, n= args=3Dnargs@entry=3D0) at vm.c:1257
#13 0x00007ffff7af1619 in sc= m_call_0 (proc=3Dproc@entry=3D0x6fc320)
=C2=A0 =C2=A0 at eval.c:4= 81
#14 0x00007ffff7b60729 in catch (tag=3Dtag@entry=3D0x404, thun= k=3D0x6fc320,=C2=A0
=C2=A0 =C2=A0 handler=3D0x6fc300, pre_unwind_= handler=3D0x6fc2a0) at throw.c:137
#15 0x00007ffff7b60a95 in scm_= catch_with_pre_unwind_handler (
=C2=A0 =C2=A0 key=3Dkey@entry=3D0= x404, thunk=3D<optimized out>,=C2=A0
=C2=A0 =C2=A0 handler= =3D<optimized out>, pre_unwind_handler=3D<optimized out>)
=
=C2=A0 =C2=A0 at throw.c:254
---Type <return> to conti= nue, or q <return> to quit---
#16 0x00007ffff7b60c4f in scm= _c_catch (tag=3Dtag@entry=3D0x404,=C2=A0
=C2=A0 =C2=A0 body=3Dbod= y@entry=3D0x7ffff7aeb680 <c_body>,=C2=A0
=C2=A0 =C2=A0 body= _data=3Dbody_data@entry=3D0x7fffffffdee0,=C2=A0
=C2=A0 =C2=A0 han= dler=3Dhandler@entry=3D0x7ffff7aeb920 <c_handler>,=C2=A0
= =C2=A0 =C2=A0 handler_data=3Dhandler_data@entry=3D0x7fffffffdee0,=C2=A0
=C2=A0 =C2=A0 pre_unwind_handler=3Dpre_unwind_handler@entry=3D0x7fff= f7aeb780 <pre_unwind_handler>, pre_unwind_handler_data=3D0x701b60) at= throw.c:377
#17 0x00007ffff7aebc90 in scm_i_with_continuation_ba= rrier (
=C2=A0 =C2=A0 body=3Dbody@entry=3D0x7ffff7aeb680 <c_bo= dy>,=C2=A0
=C2=A0 =C2=A0 body_data=3Dbody_data@entry=3D0x7ffff= fffdee0,=C2=A0
=C2=A0 =C2=A0 handler=3Dhandler@entry=3D0x7ffff7ae= b920 <c_handler>,=C2=A0
=C2=A0 =C2=A0 handler_data=3Dhandle= r_data@entry=3D0x7fffffffdee0,=C2=A0
=C2=A0 =C2=A0 pre_unwind_han= dler=3Dpre_unwind_handler@entry=3D0x7ffff7aeb780 <pre_unwind_handler>= , pre_unwind_handler_data=3D0x701b60) at continuations.c:360
#18 = 0x00007ffff7aebd75 in scm_c_with_continuation_barrier (
=C2=A0 = =C2=A0 func=3D<optimized out>, data=3D<optimized out>) at conti= nuations.c:456
#19 0x00007ffff7b5f1fc in with_guile (base=3D0x7ff= fffffdf40,=C2=A0
=C2=A0 =C2=A0 data=3D0x7fffffffdf70) at threads.= c:661
#20 0x00007ffff726ac62 in GC_call_with_stack_base ()
<= div>=C2=A0 =C2=A0from /usr/lib/x86_64-linux-gnu/libgc.so.1
#21 0x= 00007ffff7b5f5e8 in scm_i_with_guile (
=C2=A0 =C2=A0 dynamic_stat= e=3D<optimized out>, data=3D0x7fffffffdf70,=C2=A0
=C2=A0 = =C2=A0 func=3D0x7ffff7b09ce0 <invoke_main_func>) at threads.c:704
#22 scm_with_guile (func=3Dfunc@entry=3D0x7ffff7b09ce0 <invoke_ma= in_func>,=C2=A0
=C2=A0 =C2=A0 data=3Ddata@entry=3D0x7fffffffdf= a0) at threads.c:710
#23 0x00007ffff7b09ec2 in scm_boot_guile (ar= gc=3Dargc@entry=3D1,=C2=A0
=C2=A0 =C2=A0 argv=3Dargv@entry=3D0x7f= ffffffe108,=C2=A0
=C2=A0 =C2=A0 main_func=3Dmain_func@entry=3D0x4= 00b00 <inner_main>,=C2=A0
=C2=A0 =C2=A0 closure=3Dclosure@e= ntry=3D0x0) at init.c:323
#24 0x000000000040098c in main (argc=3D= 1, argv=3D0x7fffffffe108)
=C2=A0 =C2=A0 at guile.c:101
= (gdb)=C2=A0

--0000000000006164dd05776ef0a6-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 19:49:45 2018 Received: (at 32938) by debbugs.gnu.org; 4 Oct 2018 23:49:45 +0000 Received: from localhost ([127.0.0.1]:37246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8DNI-0003Iz-PK for submit@debbugs.gnu.org; Thu, 04 Oct 2018 19:49:44 -0400 Received: from world.peace.net ([64.112.178.59]:60124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8DNH-0003Ij-5Y for 32938@debbugs.gnu.org; Thu, 04 Oct 2018 19:49:43 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8DNA-0004a3-MO; Thu, 04 Oct 2018 19:49:36 -0400 From: Mark H Weaver To: Josh Datko Subject: Re: bug#32938: guile 2.2.4 crashes (u8-list->bytevector (make-bytevector 32 0)) References: Date: Thu, 04 Oct 2018 19:49:21 -0400 In-Reply-To: (Josh Datko's message of "Thu, 4 Oct 2018 16:47:14 -0600") Message-ID: <875zyhi872.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32938 Cc: 32938@debbugs.gnu.org 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: -1.0 (-) Josh Datko writes: > If you try to convert a bytevector, to a bytevector, using > u8-list->bytevector, guile crashes. > > $ guile -q > GNU Guile 2.2.4 > Copyright (C) 1995-2017 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> (use-modules (rnrs bytevectors)) > scheme@(guile-user)> (u8-list->bytevector (make-bytevector 32 0)) > [1] 126190 abort (core dumped) guile -q Indeed, the code in 'u8-list->bytevector' that's supposed to validate that its argument is a list, is broken. 'u8-list->bytevector' uses the SCM_VALIDATE_LIST_COPYLEN macro to validate the list and simultaneously compute its length. That macro implicitly assumes that its third operand will be a variable of type 'long', because the result of 'scm_ilength' is assigned to it, and 'scm_ilength' returns a 'long'. After storing the result to the variable, it checks to see if the result is negative, which would indicate that the operand wasn't a proper list. The bytevector operations that convert integer lists to bytevectors pass a variable of type 'size_t' to SCM_VALIDATE_LIST_COPYLEN. Since 'size_t' is unsigned, the -1 result from 'scm_ilength' was interpreted as ULONG_MAX instead. Thanks for the report. Mark From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 14 02:29:29 2018 Received: (at 32938-done) by debbugs.gnu.org; 14 Oct 2018 06:29:29 +0000 Received: from localhost ([127.0.0.1]:48715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBZu4-0002m3-SH for submit@debbugs.gnu.org; Sun, 14 Oct 2018 02:29:29 -0400 Received: from world.peace.net ([64.112.178.59]:38742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBZu2-0002lq-Ro for 32938-done@debbugs.gnu.org; Sun, 14 Oct 2018 02:29:27 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBZtv-0001aB-EX; Sun, 14 Oct 2018 02:29:19 -0400 From: Mark H Weaver To: Josh Datko Subject: Re: bug#32938: guile 2.2.4 crashes (u8-list->bytevector (make-bytevector 32 0)) References: Date: Sun, 14 Oct 2018 02:29:04 -0400 In-Reply-To: (Josh Datko's message of "Thu, 4 Oct 2018 16:47:14 -0600") Message-ID: <8736t9ujm7.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32938-done Cc: 32938-done@debbugs.gnu.org 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: -1.0 (-) Josh Datko writes: > If you try to convert a bytevector, to a bytevector, using > u8-list->bytevector, guile crashes. Fixed in commit fe73fedab40cf716cc39139a61c078e2c9a2f37f on the stable-2.2 branch. Thanks for the report! Mark From unknown Fri Jun 13 10:47:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 11 Nov 2018 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator