Overview
| Artifact ID: | 6df6e1a278c4555356d2c6754b0b1b30af760343 |
|---|---|
| Ticket: | 2333466fffffffffffffffffffffffffffffffff
Tcl_IsChannelExisting() broken |
| User & Date: | gneumann on 2008-11-23 15:56:31 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
Tcl_IsChannelExisting() broken in versions at least from 8.4.14 until 8.5.5 + head version. If there exists e.g. a channel named "file76", a test for channel "sock7" will report, that "sock7" exists already. Similarly, when there exists a channel named "sock182", a test for "sock18" will be incorrect. The bug is pretty obvious in Tcl_IsChannelExisting() in tcl/generic/tclIO.c if ((*chanName == *name) && (memcmp(name, chanName, (size_t) chanNameLen) == 0)) { return 1; } This comparison just tests, whether there exists a channel having the same first characters as the queried channel, but not, if the name existing channel and the queried channel have the same length. There are many possible fixes; the fastest fix is most likely to increase chanNameLen by 1, or to compare the string lengths to make the test more explicit. - foundin changed to: "obsolete: 8.5.5"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "gneumann"
- subsystem changed to: "25. Channel System"
- title changed to: "Tcl_IsChannelExisting() broken"
- type changed to: "Bug"