From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#62469: =?UTF-8?Q?=E2=80=98throw=E2=80=99?= introduces a continuation barrier Date: Sun, 26 Mar 2023 23:35:42 +0200 Message-ID: <87v8in9owh.fsf@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12248"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: 62469@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sun Mar 26 23:36:16 2023 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgY2B-0002xo-Vi for guile-bugs@m.gmane-mx.org; Sun, 26 Mar 2023 23:36:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgY20-0003Zn-DM; Sun, 26 Mar 2023 17:36:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgY1y-0003ZS-Ny for bug-guile@gnu.org; Sun, 26 Mar 2023 17:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgY1y-0000NO-FQ for bug-guile@gnu.org; Sun, 26 Mar 2023 17:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgY1y-0007v1-B8 for bug-guile@gnu.org; Sun, 26 Mar 2023 17:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 26 Mar 2023 21:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62469 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167986654730410 (code B ref -1); Sun, 26 Mar 2023 21:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Mar 2023 21:35:47 +0000 Original-Received: from localhost ([127.0.0.1]:46026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgY1j-0007uQ-A7 for submit@debbugs.gnu.org; Sun, 26 Mar 2023 17:35:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgY1h-0007uI-2X for submit@debbugs.gnu.org; Sun, 26 Mar 2023 17:35:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgY1g-0003WH-NM for bug-guile@gnu.org; Sun, 26 Mar 2023 17:35:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgY1g-0000BM-Ce for bug-guile@gnu.org; Sun, 26 Mar 2023 17:35:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=1PPuE2nuYOir5Agwogcssb+889ExxHEwu9D+Z45KhE8=; b=gdoNVhtncXs9zi XP5SXCvxDGKp8Q6MXBd4MAfUEIt2xsfktQoSl60GdA5PXhRXD6S1tm8OIodrnbLmkyo/o3O2lkex7 QO6EDaOc1+1h9EeC+U9dRhlRS+2vvvPH8jGxHVdU9AVmG+pykuu4qq8K340z20lm6GJK7JbqeyOL2 BPHA7gXNotjG3c7IcwmKR7wluDXlewKFA+eNdRgkzwdxtcBc+HFLQrp3RmGxyQJ99i4oduBx+uvu0 DARZxIxfccz+zKUYzEDlChjqRzRvBe6IGzAnhjhLUimOkb41c1FKiyI3sJYbKMVMoAEVdbcZ90O5N IMveQHiEdXI6TckuTB6w==; Original-Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgY1g-0005pi-08 for bug-guile@gnu.org; Sun, 26 Mar 2023 17:35:44 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 Germinal an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour de la Poule X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10578 Archived-At: =E2=80=98throw=E2=80=99 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 =E2=80=98scm_throw=E2=80=99 via =E2=80=98intrinsics.c=E2=80=99. A practical consequence is that a REPL running in Fibers on non-blocking ports enters an endless =E2=80=9CAttempt to suspend fiber within continuati= on barrier=E2=80=9D loop when it starts a recursive REPL due to an uncaught exception. Ludo=E2=80=99.