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.

Full log


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)]

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.