Overview
| Artifact ID: | d315be1fe14dcd1790e441398acbc144bb29ffca10b47ae301fc2c1cf565ebab |
|---|---|
| Ticket: | fa00fbbbabe2d77904ac0086884d5debf9c529a5
lseq / lindex discrepancies |
| User & Date: | apnadkarni on 2023-04-12 14:31:09 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-markdown"
- comment changed to:
I expect lindex with indices larger than list size to return empty string. This is the case with small lseq ranges but not large ones (64-bit build) ``` % lindex [lseq 0x10] 0x11 -> correctly returns empty string % lindex [lseq 0x7fffffff] 0x80000000 -> generates error instead index 2147483648 is out of bounds 0 to 2147483646 % ``` Another possibly related (on 32-bit build) ``` % lindex [lseq 0xffffffff] 0x80000000 -> should return 2147483648 % ``` This last may be related to signed/unsigned indexing and may go away with TIP 660. Finally, some check (and exception) is needed when list limit is exceeded. The following on *32-bit* Tcl should generate an error since the full range of elements cannot be accessed by indexing. ``` % llength [lseq 0x100000000] 0 ``` I have not tried this on the tip-636 branch. /Ashok
- foundin changed to: "9.0"
- is_private changed to: "0"
- login: "apnadkarni"
- priority changed to: "5 Medium"
- private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "apnadkarni"
- subsystem changed to: "- New Builtin Commands"
- title changed to: "lseq / lindex discrepancies"
- type changed to: "Bug"