Overview
| Artifact ID: | 0501051dde78d5866af78846715510895cc55a24809032c57d1bb9077f9fe395 |
|---|---|
| Ticket: | 8aa32fadb361b076d66aa37d44b6eaa43eca078d
Tcl_CreateFileHandler crash |
| User & Date: | serhiy.storchaka on 2026-09-20 10:46:49 |
Changes
- icomment:
The float was converted to 59 by Python (hence the DeprecationWarning); the crash comes from the descriptor: 674664117164 was truncated to a C int (354251692) by Python 2.6, and the select notifier passes any descriptor to <tt>FD_SET()</tt> without checking it against FD_SETSIZE, so it writes outside the <tt>fd_set</tt>. The same happens with any descriptor >= FD_SETSIZE (1024 on Linux), valid or not; with 8.6.17 and a fortified glibc: "bit out of range 0 - FD_SETSIZE on fd_set". Python 3 rejects the descriptor and the float mask of this script (OverflowError, TypeError), but <tt>createfilehandler(5000, 1, callback)</tt> or a real channel with a descriptor >= FD_SETSIZE still aborts. The epoll notifier (default on Linux in 9.x) is not affected. This is [c6897e6e6a], which has the analysis and a proposed fix (note that rejecting descriptors when channels are created does not protect Tcl_CreateFileHandler() called by an application with its own descriptors).
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Duplicate"
- status changed to: "Closed"