Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d66b54e3e391b020223bcbf708abeb16b3039dc34c09047be81af2b71f5b073a
Ticket: 3e8074aea74539cfd981ad6912c52c1488fc89c4
[interp limit time -seconds] has a y2k38 problem
User & Date: max on 2023-01-12 17:07:02
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    ```
    % set i [interp create]
    interp0
    % $i limit time -seconds [expr {2**31-1}]
    % $i limit time -seconds [expr {2**31}]
    seconds must be at least 0
    % $i limit time -seconds [expr {2**32}]
    integer value too large to represent as non-long integer
    ```
    
    This breaks several of the interp-34.* tests that use `interp limit time -seconds` when run on a system whose time is past `clock format [expr {2**31-1}]`.
    
    A quick look at the code in tclInterp.c showed that `ChildTimeLimitCmd()` parses the argument to the `-seconds` switch using `TclGetIntFromObj()` where `TclGetLongFromObj()` or even `TclGetWideIntFromObj()` (like `[clock format]`) seems more appropriate to match up with the rest of time handling in Tcl, which doesn't have a y2k38 problem in general.
    
  5. foundin changed to: "8.6.13"
  6. is_private changed to: "0"
  7. login: "max"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "d0d0130695c671d8c2d3cab5f9bc3575b9d369e4"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "max"
  14. subsystem changed to: "20. [interp]"
  15. title changed to: "[interp limit time -seconds] has a y2k38 problem"
  16. type changed to: "Bug"