GNU bug report logs - #9844
peval & dynamic-wind

Previous Next

Package: guile;

Reported by: Ian Price <ianprice90 <at> googlemail.com>

Date: Sun, 23 Oct 2011 11:53:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9844 in the body.
You can then email your comments to 9844 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#9844; Package guile. (Sun, 23 Oct 2011 11:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Price <ianprice90 <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sun, 23 Oct 2011 11:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ian Price <ianprice90 <at> googlemail.com>
To: bug-guile <bug-guile <at> gnu.org>
Subject: peval & dynamic-wind
Date: Sun, 23 Oct 2011 12:48:43 +0100
I'm getting incorrect results in v2.0.3 when combining
dynamic-wind+call/cc with partial evaluation. In the program below, the
before-thunk is supposed to protect against reentry into the
body-thunk. However, with partial-evaluation turned on it doesn't error.


(define (test peval?)
  (compile
   '(let ()
      (define (rewind-protect thunk protector)
        (dynamic-wind
          (let ((entered? #f))
            (lambda ()
              (if entered?
                  (error "Re-entering rewind-protected extent."))
              (set! entered? #t)))
          thunk
          protector))
      ((call/cc
        (lambda (k)
          (rewind-protect
           (lambda ()
             (call/cc k)
             (lambda _ 'not-supposed-to-happen))
           (lambda () #f))))
       #f))
   #:opts `(#:partial-eval? ,peval?)))

;; scheme@(guile−user)> (test #t)
;; $1 = not−supposed−to−happen
;; scheme@(guile−user)> (test #f)
;; ERROR: In procedure scm−error:
;; ERROR: Re−entering rewind−protected extent.

;; Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
;; scheme@(#{ g256}#) [1]> ,q
;; scheme@(guile−user)>


If I place a (format #t "entered? ~s~%" entered?) before the (set!
entered? #t), I see


entered? #f
entered? #f
$2 = not−supposed−to−happen


which tells me that the earlier mutation isn't effecting later continuations.

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"




Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Wed, 09 Nov 2011 16:00:03 GMT) Full text and rfc822 format available.

Notification sent to Ian Price <ianprice90 <at> googlemail.com>:
bug acknowledged by developer. (Wed, 09 Nov 2011 16:00:03 GMT) Full text and rfc822 format available.

Message #10 received at 9844-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: Ian Price <ianprice90 <at> googlemail.com>
Cc: 9844-done <at> debbugs.gnu.org
Subject: Re: bug#9844: peval & dynamic-wind
Date: Wed, 09 Nov 2011 16:58:45 +0100
On Sun 23 Oct 2011 13:48, Ian Price <ianprice90 <at> googlemail.com> writes:

> I'm getting incorrect results in v2.0.3 when combining
> dynamic-wind+call/cc with partial evaluation.

Sorry it's taken so long, but this is fixed now in stable-2.0

Thanks for the report,

Andy
-- 
http://wingolog.org/




Information forwarded to bug-guile <at> gnu.org:
bug#9844; Package guile. (Wed, 09 Nov 2011 19:21:01 GMT) Full text and rfc822 format available.

Message #13 received at 9844 <at> debbugs.gnu.org (full text, mbox):

From: Ian Price <ianprice90 <at> googlemail.com>
To: 9844 <at> debbugs.gnu.org
Cc: wingo <at> pobox.com
Subject: Re: bug#9844: peval & dynamic-wind
Date: Wed, 09 Nov 2011 19:17:37 +0000
> Sorry it's taken so long, but this is fixed now in stable-2.0

Yes, this works fine for me. Much appreciated.

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 08 Dec 2011 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 141 days ago.

Previous Next


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