Artifacts Associated With Ticket 1194458
Ticket change [8cd620b65c] (rid 127801) by jaspert on 2005-05-03 13:34:33:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I installed ActiveTcl 8.4.9.1 in directory c:/Program files/Tcl . When I start tclsh from the start menu, then type "cd /c:" (or any other drive letter) then "pwd" it crashes with what looks like a segmentation fault. If using the wish shell it crashes as soon as I type "cd /c:" presumably because the prompt displays the working directory. I have got the same result on a Windows XP Home, a Windows 2000 Professional and a Windows 98 machine. This is bounced to you from ActiveState's own list as it is a problem with core Tcl.
- foundin initialized to: "obsolete: 8.4.9"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "jaspert"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to: "calling pwd after cd'ing to /c: crashes in Windows"
- type initialized to: "Bug"
Ticket change [4fac1272ed] (rid 125864) by dkf on 2005-05-03 22:27:05:
- assignee changed to: "andreas_kupries"
- priority changed to: "9 Immediate"
Ticket change [3d0bef2164] (rid 121025) by andreas_kupries on 2005-05-03 22:41:13:
- assignee changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=75003 Corrected Category and responsible maintainer.
- login: "andreas_kupries"
- mimetype: "text/plain"
- subsystem changed to: "36. Pathname Management"
- username: "andreas_kupries"
Ticket change [719bc11b7e] (rid 100715) by nobody on 2005-05-03 23:16:27:
- icomment:
Logged In: NO This is indeed a bug (the crash), but I have to say that "/c:" is not really a valid path at all on Windows. Perhaps you mean "c/" or "c:" or "c:/" ?
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [d1456584c0] (rid 113319) by hobbs on 2005-05-30 08:46:37:
- icomment:
Logged In: YES user_id=72656 This is caused by endless recursion where TclFSEnsureEpochOk calls Tcl_FSGetNormalizedPath calls Tcl_FSGetCwd calls Tcl_FSGetFileSystemForPath calls TclFSEnsureEpochOk ... this case needs to be handled correctly. Tcl_DStringAppend(Tcl_DString * 0x00033054, const char * 0x00887e28, int 2) line 1494 + 9 bytes ExtractWinRoot(const char * 0x00887e28, Tcl_DString * 0x00033054, int 0, int * 0x00033148) line 231 + 15 bytes TclpGetNativePathType(Tcl_Obj * 0x00898508, int * 0x00000000, Tcl_Obj * * 0x00000000) line 502 + 22 bytes GetPathType(Tcl_Obj * 0x00898508, Tcl_Filesystem * * 0x00000000, int * 0x00000000, Tcl_Obj * * 0x00000000) line 3519 + 17 bytes FSGetPathType(Tcl_Obj * 0x00898508, Tcl_Filesystem * * 0x00000000, int * 0x00000000) line 4723 + 19 bytes Tcl_FSGetPathType(Tcl_Obj * 0x00898508) line 4677 + 13 bytes Tcl_FSGetNormalizedPath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x00898508) line 5665 + 9 bytes TclFSEnsureEpochOk(Tcl_Obj * 0x00898508, Tcl_Filesystem * * 0x00033260) line 5897 + 11 bytes Tcl_FSGetFileSystemForPath(Tcl_Obj * 0x00898508) line 3901 + 13 bytes Tcl_FSGetCwd(Tcl_Interp * 0x00000000) line 2525 + 12 bytes Tcl_FSGetNormalizedPath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x00898508) line 5690 + 9 bytes TclFSEnsureEpochOk(Tcl_Obj * 0x00898508, Tcl_Filesystem * * 0x00033334) line 5897 + 11 bytes Tcl_FSGetFileSystemForPath(Tcl_Obj * 0x00898508) line 3901 + 13 bytes Tcl_FSGetCwd(Tcl_Interp * 0x00000000) line 2525 + 12 bytes Tcl_FSGetNormalizedPath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x00898508) line 5690 + 9 bytes TclFSEnsureEpochOk(Tcl_Obj * 0x00898508, Tcl_Filesystem * * 0x00033408) line 5897 + 11 bytes Tcl_FSGetFileSystemForPath(Tcl_Obj * 0x00898508) line 3901 + 13 bytes Tcl_FSGetCwd(Tcl_Interp * 0x00000000) line 2525 + 12 bytes Tcl_FSGetNormalizedPath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x00898508) line 5690 + 9 bytes TclFSEnsureEpochOk(Tcl_Obj * 0x00898508, Tcl_Filesystem * * 0x000334dc) line 5897 + 11 bytes Tcl_FSGetFileSystemForPath(Tcl_Obj * 0x00898508) line 3901 + 13 bytes Tcl_FSGetCwd(Tcl_Interp * 0x00000000) line 2525 + 12 bytes Tcl_FSGetNormalizedPath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x00898508) line 5690 + 9 bytes TclFSEnsureEpochOk(Tcl_Obj * 0x00898508, Tcl_Filesystem * * 0x000335b0) line 5897 + 11 bytes Tcl_FSGetFileSystemForPath(Tcl_Obj * 0x00898508) line 3901 + 13 bytes Tcl_FSGetCwd(Tcl_Interp * 0x00000000) line 2525 + 12 bytes Tcl_FSGetNormalizedPath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x00898508) line 5690 + 9 bytes
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [9554419016] (rid 106140) by kennykb on 2005-06-21 01:22:49:
- icomment:
Logged In: YES user_id=99768 The problem is upstream from the endless recursion. By the time the normalized path name is constructed, it's already incorrect: 8.5 (correct): % file normalize c:/ C:/c: 8.4 (wrong): % file normalize c:/ C:
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [6b1b3e0f4b] (rid 128262) by kennykb on 2005-06-21 02:11:41:
- icomment:
Logged In: YES user_id=99768 It goes astray inside TclFSNormalizeAbsolutePath, when presented with pathPtr designating the path "C:/c:" This function was rewritten between 8.4 and 8.5.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [a4a757403e] (rid 110242) by dgp on 2005-06-21 07:39:30:
- icomment:
Logged In: YES user_id=80530 Is the bug here really in Tcl_FSSplitPath() ? Shouldn't it produce: C:/ ./c: according to the same spirit as: % file split /~x / ./~x on unix ?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [33002c86d7] (rid 93711) by dgp on 2005-06-21 22:04:19:
- icomment:
Logged In: YES user_id=80530 In SplitWinPath() (generic/tclFileName.c) where elements beginning with ~ are prefixed with ./ , we could also prefix with ./ any element that's not "relative" pathtype. Wouldn't that fix this? Wouldn't that be correct as well?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0a5ba71aeb] (rid 113802) by vincentdarley on 2005-06-22 00:25:03:
- icomment:
Logged In: YES user_id=32170 Apologies for not looking at this much -- been very busy! (And sadly will be for the next few weeks). Anyway, looking at this I'm beginning to think the best approach would be to backport the 8.5 filesystem changes to 8.4. 8.5 has a much more robust handling of pwd/cd, and fixes other bugs too (While some of these other fixes have been backported to 8.4, not all have -- some are very hard to do). If not, we have to find a 'different' fix since the code is so diverged in the two branches...
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [733ce396c0] (rid 105011) by kennykb on 2005-06-22 02:20:08:
- closedate changed to: "2005-06-21T19:20:08"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 dgp's change as described applies perfectly to both the HEAD and 8.4. It fixes the immediate problem my making [file split c:/c:d] return {c:/ ./c:d} and putting the converse code into [file join]. This change makes drive letters analogous to ~ syntax for user names - meainingful only in the first component. No new test failures occur with the bug fixed. - login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "kennykb"