GNU bug report logs - #48566
call-with-blocked-asyncs does not like escape continuations

Previous Next

Package: guile;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Fri, 21 May 2021 14:29:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: 48566 <at> debbugs.gnu.org
Subject: bug#48566: call-with-blocked-asyncs does not like escape continuations
Date: Fri, 21 May 2021 16:28:27 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 24 days ago.

Previous Next


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