Overview
| Artifact ID: | 4525ba4ec8feebed423f7600009ec12d5b21bf0d |
|---|---|
| Ticket: | 1160906fffffffffffffffffffffffffffffffff
core dump occurs when 'getcwd()' returns null. |
| User & Date: | tmh on 2005-03-10 20:50:37 |
Changes
- assignee changed to: "vincentdarley"
- cmimetype changed to: "text/plain"
- comment changed to:
The tclUnixFile.c file has a function TclNativeCreateNativeRep(). line 977 -> 979 has a problem. /* Make sure the normalized path is set */ validPathPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr); Tcl_IncrRefCount(validPathPtr); It is possible to construct a situation where validPathPtr is returned as NULL, and Tcl_IncrRefCount(NULL); causes a core dump. The situation leading to this is complicated. First a directory is created. /var/cores/programname This directory is mode 0700 and owned by root. A 'C' program starts as root, changes directory to /var/cores/programname. drops 'root' permission to a user permision. Opens a tcl interpreter. Tcl_EvalFiles some tcl file that includes a [clock format] command Core dump occurs. This code has worked in all versions of Tcl 8.3, 8.4 and 8.5 until recently. I have a relatively small test file available, but I do not wish to post it to the web. I will email it to those interested. - foundin changed to: "obsolete: 8.5a3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "tmh"
- subsystem changed to: "37. File System"
- title changed to: "core dump occurs when 'getcwd()' returns null."
- type changed to: "Bug"