Ticket UUID: | 488972 | |||
Title: | 64 bit bug in tclUnixNotfy.c | |||
Type: | Bug | Version: | obsolete: 8.3.4 | |
Submitter: | guymaor | Created on: | 2001-12-04 17:31:25 | |
Subsystem: | 25. Channel System | Assigned To: | andreas_kupries | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2001-12-12 01:02:42 | |
Resolution: | None | Closed By: | andreas_kupries | |
Closed on: | 2001-12-11 18:02:42 | |||
Description: |
The code which builds up the fd_set's for select() isn't 64 bit safe. (long is 64 bits, and int is 32 bits) If you have a fd >= 32, the wrong bit gets set. I've attached a suggested patch. | |||
User Comments: |
andreas_kupries added on 2001-12-12 01:02:42:
Logged In: YES user_id=75003 May I ask the original submitter to submit a patch based on Donal's idea of using fd_set ? dkf added on 2001-12-07 22:31:44: Logged In: YES user_id=79902 fd_mask is not reliably available on Solaris (i.e. in strict XPG4.2 mode it's not there.) Instead, we should be using an array of 'fd_set's, each of which is large enough on all (Solaris) platforms, and FD_SET, FD_CLEAR, FD_ISSET and FD_ZERO are macros that should be used to manipulate instances of fd_sets. fds_mask *is* always defined, BTW, but isn't necessarily as portable. None of this means anything for anywhere except Solaris (but the Linux box I have convenient access to doesn't provide fds_mask, and provides fd_mask, fd_set, and FD_* access macros.) andreas_kupries added on 2001-12-07 04:00:53: Logged In: YES user_id=75003 Donal, please check this against your 64bit branch if that truly fixes problems for 64 bit machines. Is "fd_mask" a type on which existence we can rely on ? guymaor added on 2001-12-05 00:31:27: File Added - 14163: patch |
Attachments:
- patch [download] added by guymaor on 2001-12-05 00:31:26. [details]