Overview
| Artifact ID: | 4a1768d3deef3fb10f69485ff576b82c6f2dbc90949e3ad93de0a56d19f29370 |
|---|---|
| Ticket: | 26f1328a86863216c8fae28f55ff0e09135d5d35
sizeof(int) < sizeof(void*) -> Crash |
| User & Date: | anonymous on 2022-01-07 16:13:04 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
I'm having fun trying to port Tcl to Plan 9 at the moment. One early problem was that Tcl crashed as soon as I was executing anything, like "parray env". Debugging the problem, it turns out that there is a problem in the bytecode interpreter. This is quite similar to #2796438 on AIX, it might be the same issue. The bytecode interpreter uses the macro TclGetInt1AtPtr to read an offset from the bytecode. These offsets can be negative Problem is that the result of that macro is an unsigned int, despite the name. Adding a huge unsigned number to a pointer instead of a small negative signed is of course not healthy unless you can count on wrap-around. But on Plan9/amd64, sizeof(int) == 4 and sizeof(void*) == 8. The attached path fixes this. Sorry that this patch is made against the Git mirror, I hope that is ok.
- foundin changed to: "8.7a6"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "11198a4027193b80a694e66a04403b2c879b1f6f"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "53. Configuration and Build Tools"
- title changed to: "sizeof(int) < sizeof(void*) -> Crash"
- type changed to: "Bug"