Tcl Source Code

View Ticket
Login
Ticket UUID: 3613569
Title: If a temporary file cannot be opened Tcl_LoadFile can crash
Type: Bug Created on: 2013-05-18 18:43:10
Submitter: rkeene Assigned to: dgp
Subsystem: 37. File System Severity: Critical
Priority: 5 Medium Last modified: 2013-09-24 12:07:56
Status: Closed Closed by: dkf
Resolution: Fixed Closed on: 2013-09-24 12:07:56
Version: None
Description:
copyToPtr can be NULL and it should be checked before passing it to Tcl_IncrRefCount()

http://core.tcl.tk/tcl/artifact/26a06b015bfec491bb32903223af5152b3ceeb0d?ln=3230-3231

Prelimnary patch attached, however after applying this patch I then get:
Tcl_FSGetFileSystemForPath called with NULL object
Segmentation fault (core dumped)
User Comments:
rkeene added on 2013-05-19 01:45:36:

File Added - 463423: tcl-8.6.0-bug3613569-1segfaultonnotmp.diff

dgp added on 2013-05-20 22:10:21:
Committed to trunk a forward porting of the
logic in the 8.5 branch on how to react when
NULL is returned.  Please comment if the solution
is not satisfactory.

Looks like the bug came in with TIP 357 implementation.

Attachments: