Artifacts Associated With Ticket 27b3ce2997
Ticket change [2969c8bab6] (rid 214007) by apnadkarni on 2023-04-28 16:55:57:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
Having a script longer than INT_MAX results in memory access violations even on 64-bit builds. Example is below (invalid set command is intentional) ``` try [string cat [string repeat " " 0x80000000] "set a b c"] ``` This is just one example but between the byte code compiler and TIP 280 source code -> source line number tracking there are many occasions for overflowing length limits. Fixing these is non trivial and risky so for the moment the plan is to disallow scripts or byte code sequences longer than INT_MAX. Marking as minor since not likely to have a such a long script. Scripts in safe interps are still a concern however so protection is still desirable.
- foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to: "Memory access violation in scripts > 2**31 bytes"
- type initialized to: "Bug"
Ticket change [9889d20f9a] (rid 214008) by apnadkarni on 2023-04-28 16:57:03:
- assignee changed to: "apnadkarni"
- login: "apnadkarni"
- mimetype: "text/plain"
- subsystem changed to: "47. Bytecode Compiler"
Ticket change [2cc01c43bb] (rid 214117) by apnadkarni on 2023-04-30 10:22:05:
- icomment:
Fixed in [20ed83cf25]. Generates a Tcl exception now instead of panics or crashes. Allowing for longer scripts is a longer term exercise, 9.1 or may be even later.
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [e96d1d0825] (rid 214118) by apnadkarni on 2023-04-30 10:22:17:
- closedate changed to: "2460064.9321462"
- closer changed to: "apnadkarni"
- login: "apnadkarni"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [a37c6659aa] (rid 237939) by dgp on 2025-02-26 13:49:36:
- closedate changed to: "2460733.07611693"
- closer changed to: "dgp"
- icomment:
Just taking notice of this. The limit doesn't merge to dgp-refactor, and not yet clear if the revisions there are a means of eliminating it.
- login: "dgp"
- mimetype: "text/plain"
Ticket change [7236b26164] (rid 237940) by dgp on 2025-02-26 13:54:26:
- closedate changed to: "2460733.07947376"
- icomment:
Quick answer is no, that branch crashes too without protection.
- login: "dgp"
- mimetype: "text/plain"
Ticket change [4294fc2808] (rid 237941) by dgp on 2025-02-26 13:56:25:
- assignee changed to: "dgp"
- closer changed to: "nobody"
- foundin changed to: "9.1"
- icomment:
Claiming and re-opening with some interest in examining what might be done in 9.1
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "None"
- status changed to: "Open"