[GHC] #12012: Socket operations on Windows check errno instead of calling WSAGetLastError()

GHC ghc-devs at haskell.org
Wed May 4 02:09:49 UTC 2016


#12012: Socket operations on Windows check errno instead of calling
WSAGetLastError()
-------------------------------------+-------------------------------------
           Reporter:  enolan         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Core           |           Version:
  Libraries                          |
           Keywords:                 |  Operating System:  Windows
       Architecture:                 |   Type of failure:  Incorrect result
  Unknown/Multiple                   |  at runtime
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Winsock doesn't set errno, but it is checked in `blockingReadRawBufferPtr`
 and `blockingWriteRawBufferPtr` (both are in `GHC.IO.FD`). I the same
 thing happens in the non threaded RTS too, but that's in terms of primops
 and I don't understand it very well.

 The upshot here is that every error message originating from Winsock is
 wrong. Nobody noticed since any error used to just crash your program
 (#12010).

 Here's some MinGW documentation http://oldwiki.mingw.org/index.php/sockets
 and something from MSDN https://msdn.microsoft.com/en-
 us/library/windows/desktop/ms740121%28v=vs.85%29.aspx

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12012>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list