GNU bug report logs -
#62469
‘throw’ introduces a continuation barrier
Previous Next
To reply to this bug, email your comments to 62469 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#62469
; Package
guile
.
(Sun, 26 Mar 2023 21:36:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sun, 26 Mar 2023 21:36:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
‘throw’ introduces a continuation barrier as of Guile 3.0.9:
--8<---------------cut here---------------start------------->8---
$ cat ~/src/guile-debugging/suspendable-continuation.scm
(use-modules (ice-9 control))
(let ((tag (make-prompt-tag)))
(call-with-prompt tag
(lambda ()
(catch #t
(lambda ()
(pk 'suspendable-from-catch? tag (suspendable-continuation? tag))
(throw 'whatever))
(const #t)
(lambda args
(pk 'suspendable-from-exn-handler? tag (suspendable-continuation? tag)))))
(const #t)))
$ guile ~/src/guile-debugging/suspendable-continuation.scm
;;; (suspendable-from-catch? ("prompt") #t)
;;; (suspendable-from-exn-handler? ("prompt") #f)
--8<---------------cut here---------------end--------------->8---
Apparently this is because that goes through ‘scm_throw’ via
‘intrinsics.c’.
A practical consequence is that a REPL running in Fibers on non-blocking
ports enters an endless “Attempt to suspend fiber within continuation
barrier” loop when it starts a recursive REPL due to an uncaught
exception.
Ludo’.
This bug report was last modified 1 year and 277 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.