Artifacts Associated With Ticket ad9361fd20f0b9c5
Ticket change [a0785b419c] (rid 210764) by apnadkarni on 2023-03-24 18:58:04:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
``` % string range [string insert [string repeat a 0x80000000] end-0x7fffffff X] 0 10 Xaaaaaaaaaa ``` I expected "aXaaa..." Along the same lines, ``` % set s [string repeat a 0xffffffff]; string length $s 4294967295 % string index $s end-0xfffffffe a % string range $s end-0xfffffffe end-0xfffffffe ``` `string index` gives correct result but not `string range`.
- 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: "Important"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to:
string end-relative calculation broken for large indices
- type initialized to: "Bug"
Ticket change [b4feea931a] (rid 210893) by apnadkarni on 2023-03-25 10:45:45:
- comment changed to:
``` % string range [string insert [string repeat a 0x80000000] end-0x7fffffff X] 0 10 Xaaaaaaaaaa ``` I expected "aXaaa..." Along the same lines, ``` % set s [string repeat a 0xffffffff]; string length $s 4294967295 % string index $s end-0xfffffffe a % string range $s end-0xfffffffe end-0xfffffffe <- (empty string) ``` `string index` gives correct result but not `string range`.
- icomment:
Along the same lines, ``` % string length [string range $s end-0x7fffffff end-0x7ffffffe] 2147483664 % string length [string range $s end-0x7ffffffd end-0x7ffffffd] 1 ``` So the breakage seems to occur right at end-INT_MAX. I don't understand TclEncodeIndex well enough to tell if the bug is there or in the caller (range command) /Ashok
- login: "apnadkarni"
- mimetype: "text/plain"
- comment changed to:
Ticket change [38b0f5f509] (rid 212659) by apnadkarni on 2023-04-12 16:19:32:
- assignee changed to: "apnadkarni"
- login: "apnadkarni"
- mimetype: "text/plain"
Ticket change [1d51860d2e] (rid 214190) by apnadkarni on 2023-05-01 12:19:00:
- closedate changed to: "2460066.0131983"
- closer changed to: "apnadkarni"
- icomment:
Fixed somewhere in the TIP 660 commits. Added tests in [ed26748c6b]
- login: "apnadkarni"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"