bug#62583: Guile 3.0.9 crashes when calling set-car! on the last node of '(...)

Jean Abou Samra <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>

> Le 1 avr. 2023 à 08:22, Rui Zhang <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.