GNU bug report logs - #58066
pretty-print will make data modified by set-cdr! to random value

Previous Next

Package: guile;

Reported by: slbtty <shenlebantongying <at> gmail.com>

Date: Sun, 25 Sep 2022 07:44:02 UTC

Severity: normal

Done: Jean Abou Samra <jean <at> abou-samra.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jean Abou Samra <jean <at> abou-samra.fr>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#58066: closed (pretty-print will make data modified by
 set-cdr! to random value)
Date: Wed, 19 Jul 2023 22:18:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 20 Jul 2023 00:17:10 +0200
with message-id <609596e5ad9cb6b9726d9fe176d12ac07d0b9f26.camel <at> abou-samra.fr>
and subject line Re: bug#58066: pretty-print will make data modified by set-cdr! to random value
has caused the debbugs.gnu.org bug report #58066,
regarding pretty-print will make data modified by set-cdr! to random value
to be marked as done.

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


-- 
58066: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58066
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: slbtty <shenlebantongying <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: pretty-print will make data modified by set-cdr! to random value
Date: Sat, 24 Sep 2022 06:01:13 -0400
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.


[Message part 3 (message/rfc822, inline)]
From: Jean Abou Samra <jean <at> abou-samra.fr>
To: 58066-done <at> debbugs.gnu.org
Subject: Re: bug#58066: pretty-print will make data modified by set-cdr! to
 random value
Date: Thu, 20 Jul 2023 00:17:10 +0200
[Message part 4 (text/plain, inline)]
Closing this as a duplicate
of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16060
[Message part 5 (text/html, inline)]
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.