unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#32040: Potential REPL Server Bug (with a Patch)
@ 2018-07-02 16:21 isaac lewis
  2022-12-16 22:16 ` bug#32040: bug in repl/server.scm Matt Wette
  0 siblings, 1 reply; 2+ messages in thread
From: isaac lewis @ 2018-07-02 16:21 UTC (permalink / raw)
  To: 32040

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

Good afternoon,

I experienced some issues on both Debian and Fedora a while ago with
the REPL server module.  After searching the bug database, I didn't
find any similar reports, so I decided to investigate the issues a bit
more and found that they appear to be caused by a non-idiomatic use of
dynamic-wind (that was likely the result of a typo).  A patch is
given below.

Sincerely,

Isaac Lewis

From 6dedc1a6d64ecbf6f1c9a4e60a6ea4a46c5b55ff Mon Sep 17 00:00:00 2001
From: Isaac Lewis <isaac.b.lewis@gmail.com>
Date: Mon, 2 Jul 2018 11:37:27 -0400
Subject: [PATCH] Fix a bug in the REPL server.

---
 module/system/repl/server.scm | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/module/system/repl/server.scm b/module/system/repl/server.scm
index 725eb4e..f18441d 100644
--- a/module/system/repl/server.scm
+++ b/module/system/repl/server.scm
@@ -146,14 +146,15 @@

   (dynamic-wind
     (lambda () #f)
-    (with-continuation-barrier
-     (lambda ()
-       (parameterize ((current-input-port client)
-                      (current-output-port client)
-                      (current-error-port client)
-                      (current-warning-port client))
-         (with-fluids ((*repl-stack* '()))
-           (start-repl)))))
+    (lambda ()
+      (with-continuation-barrier
+       (lambda ()
+         (parameterize ((current-input-port client)
+                        (current-output-port client)
+                        (current-error-port client)
+                        (current-warning-port client))
+                       (with-fluids ((*repl-stack* '()))
+                                    (start-repl))))))
     (lambda () (close-socket! client))))


-- 
2.9.5

[-- Attachment #2: Type: text/html, Size: 2232 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#32040: bug in repl/server.scm
  2018-07-02 16:21 bug#32040: Potential REPL Server Bug (with a Patch) isaac lewis
@ 2022-12-16 22:16 ` Matt Wette
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Wette @ 2022-12-16 22:16 UTC (permalink / raw)
  To: 32040

I can confirm this still exists in guile 3.0.8:
The symptom that I see is when client (telnet localhost 37146)
quits server responds with the following:

    In thread:
   Wrong type to apply: ()

  Nice find Isaac!







^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-16 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 16:21 bug#32040: Potential REPL Server Bug (with a Patch) isaac lewis
2022-12-16 22:16 ` bug#32040: bug in repl/server.scm Matt Wette

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).