ADDED tcl/patches/8.6.0/tcl-8.6.0-bug3613567-1tmpdirfix.diff Index: tcl/patches/8.6.0/tcl-8.6.0-bug3613567-1tmpdirfix.diff ================================================================== --- /dev/null +++ tcl/patches/8.6.0/tcl-8.6.0-bug3613567-1tmpdirfix.diff @@ -0,0 +1,19 @@ +diff -uNr tcl8.6.0.orig/unix/tclUnixFCmd.c tcl8.6.0-bug3613567-1tmpdirfix/unix/tclUnixFCmd.c +--- tcl8.6.0.orig/unix/tclUnixFCmd.c 2012-11-14 11:19:08.000000000 -0600 ++++ tcl8.6.0-bug3613567-1tmpdirfix/unix/tclUnixFCmd.c 2013-05-18 13:34:13.591452500 -0500 +@@ -2226,13 +2226,13 @@ + + dir = getenv("TMPDIR"); + if (dir && dir[0] && stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) +- && access(dir, W_OK)) { ++ && access(dir, W_OK) == 0) { + return dir; + } + + #ifdef P_tmpdir + dir = P_tmpdir; +- if (stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) && access(dir, W_OK)) { ++ if (stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) && access(dir, W_OK) == 0) { + return dir; + } + #endif ADDED tcl/patches/8.6.0/tcl-8.6.0-bug3613569-1segfaultonnotmp.diff Index: tcl/patches/8.6.0/tcl-8.6.0-bug3613569-1segfaultonnotmp.diff ================================================================== --- /dev/null +++ tcl/patches/8.6.0/tcl-8.6.0-bug3613569-1segfaultonnotmp.diff @@ -0,0 +1,21 @@ +diff -uNr tcl8.6.0.orig/generic/tclIOUtil.c tcl8.6.0-1segfaultonnotmp/generic/tclIOUtil.c +--- tcl8.6.0.orig/generic/tclIOUtil.c 2012-10-25 06:43:59.000000000 -0500 ++++ tcl8.6.0-1segfaultonnotmp/generic/tclIOUtil.c 2013-05-18 13:23:32.370452500 -0500 +@@ -3228,9 +3228,15 @@ + */ + + copyToPtr = TclpTempFileNameForLibrary(interp, pathPtr); +- Tcl_IncrRefCount(copyToPtr); + +- copyFsPtr = Tcl_FSGetFileSystemForPath(copyToPtr); ++ if (copyToPtr != NULL) { ++ Tcl_IncrRefCount(copyToPtr); ++ ++ copyFsPtr = Tcl_FSGetFileSystemForPath(copyToPtr); ++ } else { ++ copyFsPtr = NULL; ++ } ++ + if ((copyFsPtr == NULL) || (copyFsPtr == fsPtr)) { + /* + * We already know we can't use Tcl_FSLoadFile from this filesystem,