Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f3b785b36cd4e9e24f85a963c6d51bccd87ee8e212926e1072ec8ab5998c7d9a
Ticket: c6897e6e6a8a65a995ec35c9c297b926bf1b6783
select notifier crashes/misbehaves on fd >= FD_SETSIZE
User & Date: obj on 2019-11-06 12:47:35
Changes

  1. icomment:
    With your branch, it still crashes for me here:
    
    #7  0x00007f887d51df3e in Tcl_CreateFileHandler (fd=1024, mask=2, proc=proc@entry=0x7f887d51a3ac <WrapNotify>, clientData=0x5565df082ca0) at /home/oliver/tclthing/tcl-56620b4bd5/unix/tclUnixNotfy.c:634
    634		    FD_SET(fd, &tsdPtr->checkMasks.readable);
    
    .. which is entirely unsurprising, because your branch doesn't actually change anything in the problem case, which is where accept() succeeds but returns a fd >= FD_SETSIZE.
    
    The crash vs busy wait thing is likely to be a build issue. Try building without --enable-symbols, or set CFLAGS=-O. I get a busy-wait instead of a crash if I build with --enable-symbols, I suspect because the bounds-checking code gets disabled in that case.
    
  2. login: "obj"
  3. mimetype: "text/plain"
  4. username: "obj"