Artifacts Associated With Ticket 3298012
Ticket change [991d1a1f8f] (rid 110729) by dgp on 2011-05-05 18:20:23:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
With enough time and RAM.... % set count 805306368 805306368 % while {[incr count -1]} { dict set d [expr {rand()}] 0 } % dict size $d 805306367 % llength $d max length of a Tcl list (536870909 elements) exceeded % dict set d [expr rand()] 0 Program received signal SIGSEGV, Segmentation fault. 0x0000000000507084 in RebuildTable (tablePtr=0x7ab7e0) at /home/dgp/64bit/tcl8.5/unix/../generic/tclHash.c:1051 1051 *newChainPtr = NULL; ... (gdb) print tablePtr->numBuckets * sizeof(Tcl_HashEntry *) $3 = 0 The number of buckets overflowed the int range, and the attempt to write beyond the end of the empty bucket array segfaults. The exact dict insert at which this happens is a function of the hash table tuning parameters. - foundin initialized to: "obsolete: 8.5.9"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "10. Objects"
- title initialized to: "RebuildTable failure for big dicts"
- type initialized to: "Bug"
Ticket change [9dc47a6172] (rid 96367) by dkf on 2012-02-23 03:03:01:
- icomment:
Problem also (very!) likely to be present for very large arrays, as code is in common.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [f1fd1bd152] (rid 157984) by dgp on 2017-11-08 03:09:04:
- closedate changed to: "2458065.6312977"
- closer changed to: "dgp"
- comment changed to:
With enough time and RAM.... % set count 805306368 805306368 % while {[incr count -1]} { dict set d [expr {rand()}] 0 } % dict size $d 805306367 % llength $d max length of a Tcl list (536870909 elements) exceeded % dict set d [expr rand()] 0 Program received signal SIGSEGV, Segmentation fault. 0x0000000000507084 in RebuildTable (tablePtr=0x7ab7e0) at /home/dgp/64bit/tcl8.5/unix/../generic/tclHash.c:1051 1051 *newChainPtr = NULL; ... (gdb) print tablePtr->numBuckets * sizeof(Tcl_HashEntry *) $3 = 0 The number of buckets overflowed the int range, and the attempt to write beyond the end of the empty bucket array segfaults. The exact dict insert at which this happens is a function of the hash table tuning parameters. - login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- severity changed to: "Minor"
- status changed to: "Closed"