Ticket #36 (closed defect: invalid)

Opened 7 years ago

Last modified 7 years ago

getHostByName peek causing segmentation fault

Reported by: tolkad Owned by:
Priority: critical Milestone:
Component: network Version: 2.3
Keywords: Cc:


I was trying to use simpleHTTP but it was causing a segmentation fault so I downloaded the network source and inlined it into my package and added debug statements everywhere until I figured out that:

Network.BSD.getHostByName is calling c_gethostbyname which is returning 0x0000000100c01100 Network.BSD.getHostByName is then calling peek on that pointer which is causing a segmentation fault

gdb said: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xfffffffffffffff8 0x00000001006c7e62 in threadPaused ()

I am on Mac OS 10.6.6, ghc 7.0.1

I really have no idea what any of this means. Sorry.

Change History

Changed 7 years ago by tolkad

After some more testing I determined that this is caused by #peek generating 4 byte offsets instead of 8 in the Storable instance for HostEntry?.

Changed 7 years ago by tolkad

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

Mac OS ghc bug, nevermind.

Note: See TracTickets for help on using tickets.