[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #985: read-line blocks intermittantly on Atom based n
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #985: read-line blocks intermittantly on Atom based netbook |
Date: |
Mon, 18 Feb 2013 00:03:11 -0000 |
#985: read-line blocks intermittantly on Atom based netbook
---------------------+------------------------------------------------------
Reporter: kiatoa | Owner:
Type: defect | Status: new
Priority: minor | Milestone: someday
Component: unknown | Version: 4.8.x
Keywords: |
---------------------+------------------------------------------------------
This problem first shows up in:
9eef92115fba6034a98cc21ef740fd82ea52387b is the first bad commit
commit 9eef92115fba6034a98cc21ef740fd82ea52387b
Author: Peter Bex <address@hidden>
Date: Sun Nov 18 21:03:51 2012 +0100
Fix select() buffer overrun vulnerability by using POSIX poll() on
systems that support it, leaving only those few systems vulnerable that
don't (ie, only Windows).
I used the following code snippet to test. It took as much as 10 runs to
trigger the bug sometimes:
=============CODE=============
(use posix)
(define (conservative-read port)
(let loop ((res '()))
(if (not (eof-object? (peek-char port)))
(loop (cons (read-char port) res))
(apply conc (reverse res)))))
(define (cmd-run-with-stderr->list cmd . params)
(let-values (((fh fho pid fhe) (if (null? params)
(process* cmd)
(process* cmd params))))
(let loop ((curr (read-line fh))
(result '()))
(print "GOT HERE 1, curr=" curr)
(let ((errstr (conservative-read fhe)))
(print "GOT HERE 3, errstr=" errstr)
(if (not (string=? errstr ""))
(set! result (cons errstr result))))
(print "GOT HERE 2, result=" result)
(if (not (eof-object? curr))
(begin
(print "GOT HERE 4")
(loop (read-line fh)
(cons curr result)))
(begin
(print "GOT HERE 5")
(close-input-port fh)
(close-input-port fhe)
(close-output-port fho)
(reverse result))))))
(print "Got: " (cmd-run-with-stderr->list "ls"))
--
Ticket URL: <http://bugs.call-cc.org/ticket/985>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #985: read-line blocks intermittantly on Atom based netbook,
Chicken Trac <=
- Re: [Chicken-janitors] #985: read-line blocks intermittantly on Atom based netbook, Chicken Trac, 2013/02/19
- Re: [Chicken-janitors] #985: read-line blocks intermittantly on Atom based netbook, Chicken Trac, 2013/02/20
- Re: [Chicken-janitors] #985: read-line blocks intermittantly on Atom based netbook, Chicken Trac, 2013/02/20
- Re: [Chicken-janitors] #985: read-line blocks intermittantly on Atom based netbook, Chicken Trac, 2013/02/20
- Re: [Chicken-janitors] #985: read-line blocks intermittantly on Atom based netbook, Chicken Trac, 2013/02/20
- Re: [Chicken-janitors] #985: read-line blocks intermittantly on Atom based netbook, Chicken Trac, 2013/02/20