Ticket #8 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Evaluating addrFlags from use of Network.Socket.getAddrInfo causes exception

Reported by: semanticphilosopher@… Owned by: bos
Priority: major Milestone:
Component: network Version:
Keywords: Cc:


Using GHC 6.10.2 under Mac OS X 10.5.6 it does not appear that you can access the 'addrFlags' returned by getAddrInfo, you get the exception: *** Exception: unpackBits: unhandled bits set: 8

GHCi, version 6.10.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m Network.Socket
Prelude Network.Socket> getAddrInfo Nothing (Just "localhost") Nothing
Loading package syb ... linking ... done.
Loading package base- ... linking ... done.
Loading package parsec- ... linking ... done.
Loading package network-2.2.1 ... linking ... done.
[AddrInfo {addrFlags = *** Exception: unpackBits: unhandled bits set: 8
Prelude Network.Socket>

Change History

Changed 8 years ago by bos

  • owner set to bos

I just sent a fix to Johan. I can't attach it here, because the Trac install is broken and won't accept attachments.

Changed 8 years ago by bos

  • status changed from new to closed
  • resolution set to fixed

Changed 8 years ago by bos

Changed 8 years ago by tibbe

Applied. contains the fix:


Mon May  4 21:57:40 CEST 2009  Bryan O'Sullivan <bos@serpentine.com>
  * Make getAddrInfo tolerant of unknown bits (ticket #8).
  On OS X, getaddrinfo can return with bits set that have no corresponding
  definitions in the <netdb.h> header file.
Note: See TracTickets for help on using tickets.