[GHC] #7714: The type of the second argument of poll() in GHC/Event/Poll.hsc is invalid
GHC
cvs-ghc at haskell.org
Sun Feb 24 14:22:17 CET 2013
#7714: The type of the second argument of poll() in GHC/Event/Poll.hsc is invalid
-----------------------------+----------------------------------------------
Reporter: kazu-yamamoto | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.7 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
poll() is used in GHC/Event/Poll.hsc. The type of its second argument is
nfds_t. nfds_t is defined unsigned long on Linux and unsigned int on
Mac/FreeBSD. FFI in Poll.hsc uses CULong instead of (#type nfds_t).
So, this may cause a problem on Mac/FreeBSD.
Actually, a web server compiled by GHC head on FreeBSD sometime causes the
following error:
{{{
mighty-head: c_poll: invalid argument (Invalid argument)
mighty-head: sendWakeup: invalid argument (Bad file descriptor)
mighty-head: sendWakeup: invalid argument (Bad file descriptor)
mighty-head: sendWakeup: invalid argument (Bad file descriptor)
}}}
poll() on FreeBSD returns EINVAL when the specified time limit is
negative.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7714>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list