Ticket UUID: | 466102 | |||
Title: | test winFCmd-2.5 hangs | |||
Type: | Bug | Version: | obsolete: 8.4a4 | |
Submitter: | kennykb | Created on: | 2001-09-28 16:11:24 | |
Subsystem: | 37. File System | Assigned To: | vincentdarley | |
Priority: | 3 Low | Severity: | ||
Status: | Closed | Last Modified: | 2001-10-23 16:45:57 | |
Resolution: | Fixed | Closed By: | vincentdarley | |
Closed on: | 2001-10-23 09:45:57 | |||
Description: |
On a system running Windows NT 4.0 SP6, compiling with NODEBUG=0, the test winFCmd-2.5 hangs the process. | |||
User Comments: |
vincentdarley added on 2001-10-23 16:45:57:
Logged In: YES user_id=32170 Applied patch. kennykb added on 2001-10-20 05:59:27: File Added - 12220: 466102.patch kennykb added on 2001-10-20 05:59:26: Logged In: YES user_id=99768 OK, here's the patch that Vince requested; it's exactly his suggested change. hobbs added on 2001-10-20 00:30:03: Logged In: YES user_id=72656 In my case, without any changes, it works on Win2K. nobody added on 2001-10-19 15:28:33: Logged In: NO I don't quite understand the last message here. Does this mean after applying my suggested change it now works, or it now works anyway? Can you perhaps attach a patch containing the actual change you made which works? (or just apply it direct to cvs, for that matter). cheers - Vince. kennykb added on 2001-10-19 04:56:40: Logged In: YES user_id=99768 Fine with me on NT. Thanks. hobbs added on 2001-10-13 03:36:21: Logged In: YES user_id=72656 This is OK for me on Win2K as well. vincentdarley added on 2001-10-05 18:03:18: Logged In: YES user_id=32170 Just to clarify, this test is testing a 'bad case', trying to copy "" somewhere. The hang most likely is occuring when the Win32 CopyFileA/W function is called. The fix is probably to check first whether the path is both non-null and non-empty, just as is currently done with 'nativeDst'. I leave this to Kenny to test, since I don't have a suitable machine. Add something like: if (nativeSrc == NULL || (*nativeSrc == '\0')) { Tcl_SetErrno return TCL_ERROR; } vincentdarley added on 2001-09-29 06:17:13: Logged In: YES user_id=32170 I can't reproduce this on my machine, but I'm not running NT. However, the following in tclWinFCmd.c (DoCopyFile): /* * If 'nativeDst' is NULL, the following code can lock the process * up, at least under Windows2000. Therefore we have to bail at * that point. */ if (nativeDst == NULL) { Tcl_SetErrno(ENOENT); return TCL_ERROR; } would seem to be relevant. It seems as if perhaps something similar applies on your platform if 'nativeSrc' is NULL or empty or something (since that's what the test which hangs is doing). kennykb added on 2001-09-28 23:24:09: Logged In: YES user_id=99768 Oops. Sorry. Latest HEAD. I think the underlying problem is with CopyFileA in kernel32.dll, but we probably need to check for the case. nobody added on 2001-09-28 23:20:36: Logged In: NO Is this with the latest cvs head or tcl 8.3.3 or...? thanks -- Vince. |
Attachments:
- 466102.patch [download] added by kennykb on 2001-10-20 05:59:26. [details]