test winFCmd-2.5 hangs
Closed / Fixed466102ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2001-09-28 16:11:24
On a system running Windows NT 4.0 SP6, compiling with NODEBUG=0, the test winFCmd-2.5 hangs the process.
nobodyplain2001-09-28 23:20:36
Logged In: NO Is this with the latest cvs head or tcl 8.3.3 or...? thanks -- Vince.
kennykbplain2001-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.
kennykb Ticket [466102ffff]: 1 change
[History diff]2001-09-28 23:25:31
vincentdarleyplain2001-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).
vincentdarleyplain2001-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;
}
hobbsplain2001-10-13 03:36:21
Logged In: YES user_id=72656 This is OK for me on Win2K as well.
kennykbplain2001-10-19 04:56:40
Logged In: YES user_id=99768 Fine with me on NT. Thanks.
kennykb Ticket [466102ffff]: 1 change
[History diff]2001-10-19 05:30:58
nobodyplain2001-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.
hobbsplain2001-10-20 00:30:03
Logged In: YES user_id=72656 In my case, without any changes, it works on Win2K.
kennykbplain2001-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.
kennykbplain2001-10-20 05:59:27
File Added - 12220: 466102.patch
vincentdarleyplain2001-10-23 16:45:57
Logged In: YES user_id=32170 Applied patch.
Log in (anonymous is fine) to add a comment.
Attachments:
- 466102.patch [download] added by kennykb on 2001-10-20 05:59:26. [details]