Socket library ghc 5.02.1

Simon Marlow
Thu, 22 Nov 2001 15:40:21 -0000

> Am 22. Nov 2001 um 16:22 MET schrieb Simon Marlow:
> > I'm sad to say there was another bug in=20
> SocketPrim.getSocketOption in
> > 5.02.1.  Please try the enclosed patch.
> How does this explain the two differing behaviours?
> And why didn't it happen in a compiled version?

Because the 'optlen' parameter to getsockopt was wrong (1 instead of
sizeof(int)), which means that the other 3 bytes would be garbage.  If
the other 3 bytes happened to be zero, you probably wouldn't notice.

Anyway, I've tested this with the latest sources and it seems to work,
whereas I can repro the bug with 5.02.1 in GHCi.