Subject: bug#58066: closed (Re: bug#58066: pretty-print will make data modified by set-cdr! to random value)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 19 Jul 2023 22:18:02 +0000

Your bug report

#58066: pretty-print will make data modified by set-cdr! to random value

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
58066: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58066
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#58066: pretty-print will make data modified by set-cdr! to random value
From: Jean Abou Samra <[email-masked]>
To: [email-masked]
Date: Thu, 20 Jul 2023 00:17:10 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Closing this as a duplicate
of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16060

Subject: pretty-print will make data modified by set-cdr! to random value
From: slbtty <[email-masked]>
To: [email-masked]
Date: Sat, 24 Sep 2022 06:01:13 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

GNU Guile 3.0.8

Using `guile3 < file.scm` to run the code below will makes the result
of tp unpredictable (pointing to very random things)

(use-modules (ice-9 pretty-print))
(define tl '(1 2))
(define tp (cdr tl))
(set-cdr! tp (cons 3 '()))
  (pretty-print tl)
  (pretty-print tp)
---

However, if i use plain old (display tp), the code will out put
expected valve (1 2 3) (3)
(define tl '(1 2))
(define tp (cdr tl))
(set-cdr! tp (cons 3 '()))
  (display tl) (newline)
  (display tp) (newline)

---

Context:

I am using guile3's repl and whenever i access a variable's by typing
its name after (set-cdr!), the result will goes wild.