#1336 closed defect (fixed)

Another parameterize issue reported by Joo ChurlSoo

Reported by: mario Owned by:
Priority: critical Milestone: 4.12.0
Component: core libraries Version: 4.11.0
Keywords: parameterize Cc:
Estimated difficulty:

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)

Attachments (1)

0001-Save-current-values-when-leaving-parameterizes.patch (3.2 KB) - added by sjamaan 12 months ago.
First attempt, not working properly in compiled mode yet

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 months ago by sjamaan

Yup, we broke this in the fix. Looks like nobody noticed it.

comment:2 Changed 12 months ago by sjamaan

Fun detail: In compiled mode, the first one fails too!

Changed 12 months ago by sjamaan

First attempt, not working properly in compiled mode yet

comment:3 Changed 12 months ago by sjamaan

  • Milestone changed from someday to 4.12.0
  • Priority changed from major to critical

I think this is a pretty bad regression, so I'm moving this up in prio

comment:4 Changed 12 months ago by sjamaan

Slightly cleaner version of this patch sent to -hackers, plus a patch that removes the compile/runtime difference.

comment:5 Changed 11 months ago by evhan

  • Resolution set to fixed
  • Status changed from new to closed

Fixed by 9e20052/87b879b (master) and 6ea929d/a75d2b2 (chicken-5).

Note: See TracTickets for help on using tickets.