Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 991d1a1f8f208030b4f2d123860615c567369cf3
Ticket: 3298012fffffffffffffffffffffffffffffffff
RebuildTable failure for big dicts
User & Date: dgp on 2011-05-05 18:20:23
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. 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.
    
    
  4. foundin changed to: "obsolete: 8.5.9"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dgp"
  10. subsystem changed to: "10. Objects"
  11. title changed to: "RebuildTable failure for big dicts"
  12. type changed to: "Bug"