Artifacts Associated With Ticket 829027ffffffffff
Ticket change [620bf20ea7] (rid 92347) by dgp on 2003-10-23 16:42:53:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
out of memory panics are one thing, but really big list lengths appear to produce a different segfault: % lrepeat [expr {1<<25}] a; concat % lrepeat [expr {1<<26}] a; concat unable to alloc 268435456 bytes Abort % lrepeat [expr {1<<28}] a; concat unable to alloc 2147483648 bytes Abort hamming:solaris: ./tclsh % lrepeat [expr {1<<29}] a; concat Segmentation fault - foundin initialized to: "obsolete: 8.5a0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "17. Commands I-L"
- title initialized to: "lrepeat segfaults for big lists"
- type initialized to: "Bug"
Ticket change [3338bd58cb] (rid 106550) by dgp on 2003-10-24 03:03:16:
- icomment:
Logged In: YES user_id=80530 This appears to be integer overflow in the argument to ckalloc(). As observed in the chat: jenglishWith 32-bit ints, (1 << 30) * sizeof(int) == (1 << 32) == 0.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [ae657d89c6] (rid 101632) by dgp on 2003-10-24 03:12:11:
- icomment:
Logged In: YES user_id=80530 Also contributing is that there's a sizeof(Tcl_Obj) where there should be a sizeof(Tcl_Obj *).
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3d3324d075] (rid 121049) by dgp on 2003-10-24 03:16:34:
- icomment:
Logged In: YES user_id=80530 Use of attemptckalloc leading to a TCL_ERROR and error message when insufficient memory would also be better than the panic.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "829027.patch" [da5271e9c8] (rid 107756) by dgp on 2003-10-24 04:11:54.
Ticket change [57c53a2423] (rid 117682) by dgp on 2003-10-24 04:11:54:
- icomment:
File Added - 65247: 829027.patch Logged In: YES user_id=80530 The usage of attempckalloc is trickier than it first appears, given the use of ckalloc within the Tcl_ListObj* routines. Here's a patch dealing with just the original report.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [edb1ffe945] (rid 103935) by dkf on 2003-10-24 16:33:09:
- icomment:
Logged In: YES user_id=79902 SEGV's bad; boosting prio
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "dkf"
- icomment:
Ticket change [4d6108abb7] (rid 127042) by dkf on 2003-11-01 06:13:41:
- icomment:
Logged In: YES user_id=79902 [lrepeat] really ought to soft-fail when insufficient memory is available, but doing that is tricky because you have to tell the list constructor that it now has ownership of an array, instead of the current technique which is a copy. OTOH, there is definitely still utility in allocating such arrays since you can use [lset] to manipulate them safely. Sounds like a new (internal) function: TclNewListObjDirect()
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [95b4390ca3] (rid 106199) by dkf on 2003-11-01 08:33:54:
- closedate changed to: "2003-11-01T01:33:54"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Fixed (as far as I can tell - these memory-allocation-failure things are awkward for me to test for assorted not very nice reasons) and performance-engineered a bit at the same time.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"