|
2017-11-08
| ||
| 03:09 | • Closed ticket [3298012fff]: RebuildTable failure for big dicts plus 7 other ... artifact: f1fd1bd152 user: dgp | |
| 02:23 | [3298012] Stop RebuildTable asking ckalloc for more than it can give. check-in: 42a6035399 user: dgp tags: core-8-6-branch | |
| 02:18 | [3298012] Stop RebuildTable asking ckalloc for more than it can give. check-in: 82ced5efa6 user: dgp tags: core-8-5-branch | |
|
2012-02-23
| ||
| 03:03 | • Ticket [3298012fff] RebuildTable failure for big dicts status still Open wit... artifact: 9dc47a6172 user: dkf | |
|
2011-05-05
| ||
| 18:20 | • New ticket [3298012fff]. artifact: 991d1a1f8f user: dgp | |
RebuildTable failure for big dicts
Closed / Fixed3298012fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 9 years ago
Descriptionplain2011-05-05 18:20:23
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.
dkfplain2012-02-23 03:03:01
Problem also (very!) likely to be present for very large arrays, as code is in common.
dgp Closed ticket [3298012fff].
[History diff]2017-11-08 03:09:04
Log in (anonymous is fine) to add a comment.