Overview
| Artifact ID: | de3940aeea532db1c7956db6ee0ccf9bc3563fa06f562ff12fe0a5c805e66c71 |
|---|---|
| Ticket: | 89dfecb6b7468953b2563eb6034d6a087388770e
inconsistent thread id values in testing commands |
| User & Date: | dgp on 2018-02-20 14:58:38 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Tcl itself does not expose thread IDs to scripts. The Thread package does, and does so via a formatted string representation tid0xHHHH... where the HHHH is a hex encoding of a pointer value. Tcl does have some testing commands that expose thread IDs as Tcl values: testmainthread, testchannel mthread, testthread create, testthread id (some other testing commands accept these values as arguments) These testing commands do not use the same value encoding that the Thread package does. Worse, they do not even use a fully consistent encoding among themselves. Some report the pointer value as a signed long, others as a signed wide, using decimal representation in both cases. The difference shows up only on platforms where long and wide are different, typically 32-bit systems. Recent adoption of TIP 484 in 8.7a2 has exposed the problem as testing failures. In particular, test chan-io-59.1 reports failure because the signed long representation of a thread ID pointer returned by [testmainthread] is not equal to the signed wide representation (new with TIP 484!) of the same thread ID pointer returned by [testchannel mthread]. I think the best fix is to settle on the common signed wide rep of [testthread id] and get them all consistent. A related issue is to note that TclFormatInt() has incompatibly changed its function (It used to format the string rep of a signed long value -- now it does a signed wide value ) and all callers need to be checked that they are ok with that. - foundin changed to: "8.5+"
- is_private changed to: "0"
- login: "dgp"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "49. Threading"
- title changed to: "inconsistent thread id values in testing commands"
- type changed to: "Bug"