Tcl Source Code

View Ticket
Login
Ticket UUID: 6aea6a8e25122d5f6210119897612ef452009fd0
Title: dict size overflow
Type: Bug Created on: 2017-11-08 17:26:29
Submitter: dgp Assigned to: nobody
Subsystem: 15. Dict Object Severity: Minor
Priority: 5 Medium Last modified: 2017-11-08 17:26:29
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: all
Description:
With enough RAM and time...

% set count [expr {(1<<31)-1}]
2147483647
% while {[incr count -1]} {
dict set d [expr {rand()}] 0
}
% dict size $d
2147483646
% dict set d 2 0; dict size $d
2147483647
% dict set d 3 0; dict size $d
-2147483648