emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62583: closed (Guile 3.0.9 crashes when calling set-car! on the last


From: GNU bug Tracking System
Subject: bug#62583: closed (Guile 3.0.9 crashes when calling set-car! on the last node of '(...))
Date: Sat, 01 Apr 2023 06:47:01 +0000

Your message dated Sat, 1 Apr 2023 08:46:04 +0200
with message-id <A0944F9F-BAF8-413D-A7A8-689C3D85F1A9@abou-samra.fr>
and subject line Re: bug#62583: Guile 3.0.9 crashes when calling set-car! on 
the last node of '(...)
has caused the debbugs.gnu.org bug report #62583,
regarding Guile 3.0.9 crashes when calling set-car! on the last node of '(...)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
62583: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62583
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Guile 3.0.9 crashes when calling set-car! on the last node of '(...) Date: Sat, 1 Apr 2023 00:12:05 +0000
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


Best regards,
-Rui


--- End Message ---
--- Begin Message --- Subject: Re: 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


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

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]