unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#48566: call-with-blocked-asyncs does not like escape continuations
@ 2021-05-21 14:28 Maxime Devos
  0 siblings, 0 replies; only message in thread
From: Maxime Devos @ 2021-05-21 14:28 UTC (permalink / raw)
  To: 48566

[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]

Version: 3.0.5 (as found on Guix System, on a x86-64 system)

Here is a minimal reproducer.

(use-modules (ice-9 control))
(define (test)
  (define (safe-point)
    (call-with-unblocked-asyncs (lambda () 'hi)))
  (let/ec
    ec
    (call-with-blocked-asyncs
      (lambda () (system-async-mark ec) (safe-point))))
  (call-with-blocked-asyncs safe-point))
(test)

Output:

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
In procedure call-with-unblocked-asyncs: asyncs already unblocked

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
           2 (call-with-blocked-asyncs #<procedure safe-point ()>)
           1 (call-with-unblocked-asyncs #<procedure 7f83245ad2a0 at /home/sylvii…>)
In ice-9/boot-9.scm:
  1669:16  0 (raise-exception _ #:continuable? _)

This bug was found while trying to test whether the definition of with-mutex
is correct in the present of asynchronicities (system-async-mark). (with-mutex
does not use call-with-blocked-asyncs & call-with-unblocked-asyncs, while I
think it should --- what if the Scheme code was interrupted in the 'in-guard'
or 'out-guard' of a dynamic-wind?).

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-21 14:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 14:28 bug#48566: call-with-blocked-asyncs does not like escape continuations Maxime Devos

unofficial mirror of bug-guile@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
		bug-guile@gnu.org
	public-inbox-index guile-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.bugs
	nntp://news.gmane.io/gmane.lisp.guile.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git