#2703: Buffer overflow, occasional segfaults when using handles created by
Network.
-------------------------------+--------------------------------------------
    Reporter:  sclv            |       Owner:                   
        Type:  bug             |      Status:  new              
    Priority:  normal          |   Component:  libraries/network
     Version:  6.8.3           |    Severity:  normal           
    Keywords:                  |    Testcase:                   
Architecture:  x86_64 (amd64)  |          Os:  Linux            
-------------------------------+--------------------------------------------
 See attached test cases (BigSock and BigSockFail). They both implement a
 simple echo server that reads lines from a socket and writes them to
 stdout -- the working case using the underlying Network.Socket API and the
 failing case using handles from the Network library.

 If a single line of sufficient size (We used a 5MB file, but a smaller one
 would probably be fine) is sent to the working case, it behaves as
 expected, eventually writing out the line. Additional connections may be
 made during this, which write data to stdout as expected. Additional
 connections may also be made following this.

 If a line of the same size is sent to the failing case, it occasionally
 segfaults, although this is hard to reproduce. When it does not segfault,
 the socket nonetheless becomes permanently nonresponsive. The large line
 is never output. Future connections are accepted by the binary (i.e.
 netcat reveals they are accepted), but the accept call in Haskell never
 succeeds, and no further interaction with the binary over the socket is
 possible.

 This behavior has caused some massive grief before the cause was tracked
 down.

 Both cases have been tested with the threaded runtime.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2703>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to