Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-03
07:44 • Ticket [218014ffff] closed standard channels cause core dump status still Cl... artifact: c63e57cadd user: dgp
2000-10-26
08:12 • Closed ticket [218014ffff]. artifact: daba9f3c9e user: welch
00:52 • New ticket [218014ffff]. artifact: 47b919e0ed user: nobody

closed standard channels cause core dump

Closed / Fixed218014ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:52:11
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.
welch Closed ticket [218014ffff]. [History diff]2000-10-26 08:12:12
dgp Ticket [218014ffff]: 3 changes [History diff]2001-04-03 07:44:00
Log in (anonymous is fine) to add a comment.