GNU bug report logs - #39811
Missing dynwind exit application

Previous Next

Package: guile;

Reported by: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>

Date: Thu, 27 Feb 2020 19:00:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> igalia.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 39811 in the body.
You can then email your comments to 39811 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#39811; Package guile. (Thu, 27 Feb 2020 19:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Thu, 27 Feb 2020 19:00:02 GMT) Full text and rfc822 format available.

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

From: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: Missing dynwind exit application
Date: Thu, 27 Feb 2020 19:59:25 +0100
[Message part 1 (text/plain, inline)]
Executing this code on guile-3.0.0:

(dynamic-wind
 (lambda () (pk 'enter))
 (lambda () (catch #t
              (lambda () (throw 1))
              (lambda x (pk 'catch x) (apply throw x))))
 (lambda () (pk 'leave)))

Leads to the output:

scheme@(guile-user)> (load "bug.scm")
;;; (enter)
;;; (catch (a))

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Throw to key `a' with args `()'.

What, it does not execute the leave part of the dynamic wind.

This works however,

(catch #t
  (lambda ()
    (dynamic-wind
      (lambda () (pk 'enter))
      (lambda () (catch #t
                   (lambda () (throw 'a))
                   (lambda x (pk 'catch x) (apply throw x))))
      (lambda () (pk 'leave))))
  (lambda x #f))

So is this how it should be?
[Message part 2 (text/html, inline)]

Reply sent to Andy Wingo <wingo <at> igalia.com>:
You have taken responsibility. (Tue, 03 Mar 2020 20:35:01 GMT) Full text and rfc822 format available.

Notification sent to Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>:
bug acknowledged by developer. (Tue, 03 Mar 2020 20:35:02 GMT) Full text and rfc822 format available.

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

From: Andy Wingo <wingo <at> igalia.com>
To: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
Cc: 39811-close <at> debbugs.gnu.org
Subject: Re: bug#39811: Missing dynwind exit application
Date: Tue, 03 Mar 2020 21:33:47 +0100
Stefan Israelsson Tampe <stefan.itampe <at> gmail.com> writes:

> Executing this code on guile-3.0.0:
>
> (dynamic-wind
>  (lambda () (pk 'enter))
>  (lambda () (catch #t
>               (lambda () (throw 1))
>               (lambda x (pk 'catch x) (apply throw x))))
>  (lambda () (pk 'leave)))
>
> Leads to the output:
>
> scheme@(guile-user)> (load "bug.scm") 
> ;;; (enter) 
> ;;; (catch (a)) 
>
> ice-9/boot-9.scm:1669:16: In procedure raise-exception: 
> Throw to key `a' with args `()'. 
>
> What, it does not execute the leave part of the dynamic wind.

That is because the REPL leaves you in the context of where the uncaught
error was thrown.  If you ,quit the REPL to go back to the outer REPL,
it will print "leave" as expected.  Please reopen if I have
misunderstood :)

Cheers,

Andy




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 01 Apr 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 84 days ago.

Previous Next


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