[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #1133: segfault violation when using tcp-accept (
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #1133: segfault violation when using tcp-accept (as last s-exp?) |
Date: |
Thu, 19 Jun 2014 18:14:26 -0000 |
#1133: segfault violation when using tcp-accept (as last s-exp?)
-----------------------------+----------------------------------------------
Reporter: kristianlm | Owner:
Type: defect | Status: new
Priority: critical | Milestone: someday
Component: core libraries | Version: 4.9.x
Resolution: | Keywords:
-----------------------------+----------------------------------------------
Old description:
> As shown in this paste,
>
> http://paste.call-
> cc.org/paste?id=bfe5899d243035a1a5a67f48b97675dbc3405458
>
> {{{
> $ cat foo.scm
> (use tcp srfi-18)
> (tcp-accept (tcp-listen 1230))
> $ csc foo.scm && ./foo &
> [1] 5449
> $ nc localhost 1230
>
> Error: segmentation violation
>
> Call history:
>
> foo.scm:2: tcp-listen
> foo.scm:2: tcp-accept <--
> [1]+ Exit 70 ./foo
> }}}
>
> This works from csi -s foo.scm.
New description:
As shown in this paste,
http://paste.call-cc.org/paste?id=bfe5899d243035a1a5a67f48b97675dbc3405458
{{{
$ cat foo.scm
(use tcp srfi-18)
(tcp-accept (tcp-listen 1230))
$ csc foo.scm && ./foo &
[1] 5449
$ nc localhost 1230
Error: segmentation violation
Call history:
foo.scm:2: tcp-listen
foo.scm:2: tcp-accept <--
[1]+ Exit 70 ./foo
}}}
This works from csi -s foo.scm.
--
Comment(by sjamaan):
A workaround for this problem (if it ever occurs in practice) is to add
{{{(use ports)}}} to the program (or even {{{(require-library ports)}}} if
you're paranoid about not importing anything you're not using).
--
Ticket URL: <http://bugs.call-cc.org/ticket/1133#comment:2>
CHICKEN Scheme <http://www.call-with-current-continuation.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.