Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 47b919e0edfa4da60ca9eb61be690c15ca7ca4f1
Ticket: 218014ffffffffffffffffffffffffffffffffff
closed standard channels cause core dump
User & Date: nobody on 2000-10-26 00:52:11
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 922 Bug
    Version: 8.0.4
    SubmitDate: '1998-12-04'
    LastModified: '1999-02-02'
    Severity: MED
    Status: Closed
    Submitter: welch
    ChangedBy: stanton
    OS: All
    OSVersion: NA
    Machine: NA
    FixedDate: '2000-10-25'
    FixedInVersion: 8.0.5
    ClosedDate: '1999-02-02'
    
    
    Some time around April I had let you know that we were experiencing a core
    dump with TCL8.0P2 when any of the standard I/O streams were not open at
    startup. At that time I was able to reproduce it on both HP-UX and Linux.
    I have retested for the problem with TCL8.0.4 and, while it is no longer
    occurring on Linux, it is still occurring on HP-UX. This, perhaps, means
    that a fix was made, but not in a general enough place.
    
    I looked into the TCL source this morning, and was able to find the
    problem and code an easy resolution to it. "tclGetDefaultStdChannel", in
    "tclUnixChan.c", calls "Tcl_MakeFileChannel" which is returning "NULL". It
    then, without checking for "NULL", calls "Tcl_SetChannelOption" twice, the
    first time to set "translation", and the second time to set "buffering".
    It is this latter call, i.e. the one which sets "buffering", which
    crashes. For some reason (which I have yet to determine), the earlier
    "lseek", which is supposed to protect against this possibility, is
    returning 0 rather than -1.
    
    The following patch, which you are entirely welcome to plagerize, fixes
    the problem. We would appreciate it very much if some incantation of it
    would eventually make it into the production stream.
    
    Patch on the web database.
    
    02/02/1999 10:59 - stanton - A similar patch was applied at some point in 8.0.5.  This is no longer a bug.
    
    
    
  4. foundin changed to: "obsolete: 8.0.4"
  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: "62. (unused)"
  10. title changed to: "closed standard channels cause core dump"
  11. type changed to: "Bug"