Summary
Another parameterize issue reported by Joo ChurlSoo
Metadata
- Id: 920368b29092b19d54240d96eb1c63b92306feab
- Trac id: 1336
- Type: defect
- Reporter: mario
- Owner:
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: critical
- Milestone: 4.12.0
- Version: 4.11.0
- Changetime: 2016-12-12 02:49:00 UTC
- Created: 2016-12-06 21:02:31 UTC
- Keywords: parameterize
Attachments
- 920368b29092b19d54240d96eb1c63b92306feab/attachments/0001-Save-current-values-when-leaving-parameterizes.patch
Description
Reported by Joo ChurlSoo via e-mail.
CHICKEN
(c) 2008-2016, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.11.0 (rev ce980c4)
windows-mingw32-x86 [ manyargs dload ptables ]
compiled 2016-05-28 on yves.more-magic.net (Linux)
#;1> (let ((f (make-parameter 'a))
(path '())
(g (make-parameter 'g))
(c #f))
(let ((add (lambda () (set! path (cons (f) path)))))
(add)
(parameterize ((f 'b)
(g (call-with-current-continuation
(lambda (c0) (set! c c0) 'c))))
(add) (f (g)) (add))
(f 'd)
(add)
(if (< (length path) 8)
(c 'e)
(reverse path))))
(a b c d b e d b e d) ; correct
#;2> (let ((f (make-parameter 'a))
(path '())
(g (make-parameter 'g))
(c #f))
(let ((add (lambda () (set! path (cons (f) path)))))
(add)
(parameterize ((f 'b))
(g (call-with-current-continuation (lambda (c0) (set! c c0) 'c)))
(add) (f (g)) (add))
(f 'd)
(add)
(if (< (length path) 8)
(c 'e)
(reverse path))))
(a b c d a e d d e d) ; seems to be incorrect
;; (cf.)
(a b c d c e d e e d)
Changes and comments
[2016-12-06 21:45:04 UTC] sjamaan wrote:
Yup, we broke this in the fix. Looks like nobody noticed it.
[2016-12-06 21:59:37 UTC] sjamaan wrote:
Fun detail: In compiled mode, the first one fails too!
[2016-12-06 22:15:35 UTC] sjamaan attached 0001-Save-current-values-when-leaving-parameterizes.patch (description=First attempt, not working properly in compiled mode yet)
[2016-12-06 22:27:33 UTC] sjamaan changed priority from major to critical
[2016-12-06 22:27:33 UTC] sjamaan changed milestone from someday to 4.12.0
[2016-12-06 22:27:33 UTC] sjamaan wrote:
I think this is a pretty bad regression, so I'm moving this up in prio
[2016-12-07 22:44:10 UTC] sjamaan wrote:
Slightly cleaner version of this patch sent to -hackers, plus a patch that removes the compile/runtime difference.
[2016-12-12 02:49:00 UTC] evhan changed status from new to closed
[2016-12-12 02:49:00 UTC] evhan set resolution to fixed
[2016-12-12 02:49:00 UTC] evhan wrote:
Fixed by 9e20052/87b879b (master) and 6ea929d/a75d2b2 (chicken-5).