Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: > While debugging why several libgo tests on Solaris 2/SPARC were hanging > in select (cf. PR go/48242, go/48243), I found that fd_set is > > typedef struct fd_set { > long fds_bits[__howmany(FD_SETSIZE, FD_NFDBITS)]; > } fd_set; > > The current implementation of the FD* funcs in sysfile_posix.go assumes > 64-bit fds_bits. While this doesn't make a difference on little-endian > hosts, on big-endian SPARC the wrong bits are set, leading to the > observed hang since there is no activity on those random fds. > > The following patch fixes this by moving the FD* implementation to two > new sysfile_fdset{32, 64}.go files to fix this. There's almost > certainly a cleaner/shorter implemenation, but this worked for me. > While the affected tests don't hang anymore now, they still don't finish > successfully, among others due to PR go/48222.
What an annoying problem. Sorry about that. But why don't we just change to byte? Ian