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: slbtty <shenlebantongying <at> gmail.com>
Subject: bug#58066: closed (Re: bug#58066: 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 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 58066 <at> debbugs.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: 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 3 (text/plain, inline)]
Closing this as a duplicate
of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16060
[Message part 4 (text/html, inline)]
[signature.asc (application/pgp-signature, inline)]
[Message part 6 (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.



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

Previous Next


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