unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: 48566@debbugs.gnu.org
Subject: bug#48566: call-with-blocked-asyncs does not like escape continuations
Date: Fri, 21 May 2021 16:28:27 +0200	[thread overview]
Message-ID: <5e0d33b7b70e3a03aa892e65a8ad4d894d633a85.camel@telenet.be> (raw)

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

                 reply	other threads:[~2021-05-21 14:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e0d33b7b70e3a03aa892e65a8ad4d894d633a85.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=48566@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).