Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1453234d5c20bb56018bb7de35f7b4ba3a22a4a1
Ticket: 218656ffffffffffffffffffffffffffffffffff
"clock format" crash on 1970 wraparound
User & Date: nobody on 2000-10-26 01:03:46
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1612 Bug
    Version: 8.1b2
    SubmitDate: '1999-03-24'
    LastModified: '1999-04-15'
    Severity: CRIT
    Status: Released
    Submitter: pat
    ChangedBy: stanton
    RelatedBugIDs: 1192
    OS: Windows NT
    OSVersion: Server 4.0 Service Pack 3 (Japanese)
    Machine: X86
    FixedDate: '1999-04-15'
    FixedInVersion: 8.1b3
    ClosedDate: '2000-10-25'
    
    
    Name:
    Taketo Kabe
    
    ReproducibleScript:
        # on WindowsNT,
        set env(TZ) JST-9  ;#Japan Stantard Time; 9 hours east
        clock format -32400
        # any values between -32400 and -1 will crash the interp
        
    
    
    
    ObservedBehavior:
        The interpreter crashes.
        
    
    
    
    DesiredBehavior:
        return "Thu Jan 01 00:00:00 JST 1970"
        
    
    
    
    
    
        Only ease-of-GMT timezones seems to reveal this problem.
        Unfortunately I don't have build/debug environ for Windows, but
        I suspect that passing negative values to localtime() in
        win/tclTinTime.c:TclpGetDate() is causing the problem.
        If localtime() returned illegal (struct tm), it could crash as
        compat/strftime.c:_fmt() doesn't have any range checking.
        
    
    
  4. foundin changed to: "obsolete: 8.1b2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "48. Number Handling"
  10. title changed to: ""clock format" crash on 1970 wraparound"
  11. type changed to: "Bug"