unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Jean Abou Samra <jean@abou-samra.fr>
To: Rui Zhang <zrui16@hotmail.com>
Cc: 62583-done@debbugs.gnu.org
Subject: bug#62583: Guile 3.0.9 crashes when calling set-car! on the last node of '(...)
Date: Sat, 1 Apr 2023 08:46:04 +0200	[thread overview]
Message-ID: <A0944F9F-BAF8-413D-A7A8-689C3D85F1A9@abou-samra.fr> (raw)
In-Reply-To: <KL1PR01MB49105C4B939EC38215BB6D03DC8C9@KL1PR01MB4910.apcprd01.prod.exchangelabs.com>

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]



> Le 1 avr. 2023 à 08:22, Rui Zhang <zrui16@hotmail.com> a écrit :
> 
> Reproduction:
> 
>    (let ((xs '(1)))
>      (set-car! xs 0))
> 
> or
> 
>    (let ((xs '(1 2)))
>      (set-car! (cdr xs) 0))
> 
> Guile will segfault executing this code, and only when set-car! is called on the last node.  I believe the expectation is that it does not segfault and xs will be modified to (0) or (1 0) in these two examples.
> 
> If I use (list 1) instead of '(1), Guile does not seem to segfault.  Maybe '(1) is constructed differently?
> 
> 
> $ guile --version
> guile (GNU Guile) 3.0.9
> Copyright (C) 2023 Free Software Foundation, Inc.
> 
> License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> $ ./config.guess
> x86_64-pc-linux-gnu


A duplicate of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16060

[-- Attachment #2: Type: text/html, Size: 1874 bytes --]

      reply	other threads:[~2023-04-01  6:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01  0:12 bug#62583: Guile 3.0.9 crashes when calling set-car! on the last node of '(...) Rui Zhang
2023-04-01  6:46 ` Jean Abou Samra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A0944F9F-BAF8-413D-A7A8-689C3D85F1A9@abou-samra.fr \
    --to=jean@abou-samra.fr \
    --cc=62583-done@debbugs.gnu.org \
    --cc=zrui16@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).