Artifacts Associated With Ticket 92aeb847f9b92cfb
Ticket change [74d49b98a2] (rid 238962) by jan.nijtmans on 2025-04-10 14:21:03:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
Example (by Ashok): <pre> % proc xx [lrepeat 0x100000000 x] {} killed Or explicitly defining the proc in script % set l [lrepeat 0x100000000 x]; llength $l 4294967296 % writeFile manyargs.tcl [list proc xx $l {return $x}] % exit [apn@tcltk build]$ LD_LIBRARY_PATH=`pwd` ./tclsh manyargs.tcl killed </pre> Note that this has no relation to TIP #626: Those examples don't have more than 2**31 command lines arguments, the "proc" command just has it's second command-line argument being a list with 2**31 arguments. Since Tcl 9.0 already allows large list sizes, Tcl 9.0 should already be able to handle this. Since a proc with that many variable is unrealistic, setting this ticket as "minor" - foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "jan.nijtmans"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0c50e5320704d174412e57b873d8932de15303e0"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "jan.nijtmans"
- subsystem initialized to: "22. [proc] and [uplevel]"
- title initialized to: "proc with more than 2**31 variables"
- type initialized to: "Bug"
Ticket change [660a520836] (rid 238969) by jan.nijtmans on 2025-04-10 14:46:19:
- icomment:
After 'fix': <pre> $ ./tclsh % proc xx [lrepeat 0x100000000 x] {} total mallocs 202168073 total frees 130242 current packets allocated 202037831 current bytes allocated 43653712110 maximum packets allocated 202037831 maximum bytes allocated 43653712110 procedure "xx": arg list contains too many (4294967296) entries % % % exit </pre> - login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [6772f18789] (rid 239107) by jan.nijtmans on 2025-04-14 07:57:45:
- icomment:
After better fix: <pre> $ ./tclsh % proc xx [lrepeat 0x100000000 x] {} total mallocs 163959265 total frees 130503 current packets allocated 163828762 current bytes allocated 41896099036 maximum packets allocated 163828762 maximum bytes allocated 41896099036 procedure "xx": memory error % </pre> Actually, it depends where the allocation error occurs. It might happen in a Tcl_Alloc(), it also might happen in Tcl_CreateHashEntry(). In the first case, we might use Tcl_AttemptAlloc() and do a proper cleanup. In the other case, we would need a Tcl_AttemptCreateHashEntry() (TIP!) - login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [c99a8eb6c0] (rid 239194) by jan.nijtmans on 2025-04-15 22:21:55:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2460781.43189405"
- closer changed to: "jan.nijtmans"
- icomment: "Fixed [3af3ca8d988e9a1f|here]"
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"