|
2002-03-12
| ||
| 18:34 | • Closed ticket [528284ffff]: Fix filesystem crashed under win98 plus 7 other ... artifact: ad8598f97e user: mdejong | |
|
2002-03-11
| ||
| 21:21 | • Ticket [528284ffff]: 4 changes artifact: ecfdbe64c8 user: nobody | |
| 06:52 | • Ticket [528284ffff]: 4 changes artifact: 0f38609d76 user: mdejong | |
| 06:52 | • Add attachment win_fs.patch to ticket [528284ffff] artifact: d68216cfa4 user: mdejong | |
|
2002-03-10
| ||
| 23:52 | • New ticket [528284ffff] Fix filesystem crashed under win98. artifact: cddd9f8b01 user: mdejong | |
Fix filesystem crashed under win98
Closed / Accepted528284ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2002-03-10 23:52:46
I noticed that Tcl is not able to make it through
the tests in winFCmd.test without crashing or
going into an infinite loop under Windows 98.
I created this patch, which fixes the crashes
and returns ENOENT when a path like "" is
passed in. The comments for these functions
state that ENOENT should be returned, but I
am not sure that jives with the test cases
in winFCmd.test. I would ask that someone
run the tests in winFCmd.test under NT to
see if this patch changes any of the test
results. Further changes to the expected
test results may be needed, but I am not sure
how the 98/NT thing plays into it just now.
Also, this patch changes a check that looked
like so:
if (tclWinProcs->useWide) {
if (((WCHAR *) nativePath)[0] == '\0') {
Tcl_SetErrno(ENOENT);
return TCL_ERROR;
}
} else {
if (((char *) nativePath)[0] == '\0') {
Tcl_SetErrno(ENOENT);
return TCL_ERROR;
}
}
to:
if (nativePath == NULL || nativePath[0] == '\0') {
Tcl_SetErrno(ENOENT);
return TCL_ERROR;
}
I could not see any reason to make this extra
useWide check, so I took a peek at the generated
ASM:
9: cond = ((WCHAR *) path[0] == '\0');
0040102A mov eax,dword ptr [path]
0040102D movsx ecx,byte ptr [eax]
00401030 neg ecx
00401032 sbb ecx,ecx
00401034 inc ecx
00401035 mov dword ptr [cond],ecx
10: } else {
00401038 jmp main+38h (00401048)
11: cond = ((char *) path[0] == '\0');
0040103A mov edx,dword ptr [path]
0040103D movsx eax,byte ptr [edx]
00401040 neg eax
00401042 sbb eax,eax
00401044 inc eax
00401045 mov dword ptr [cond],eax
The code certainly looks exactly the same,
except for the registers that are used.
Since I could not come up with any reason
for this extra complexity, I removed it.
mdejongplain2002-03-11 06:52:46
File Added - 19130: win_fs.patch
nobodyplain2002-03-11 21:21:37
Logged In: NO The patch looks good to me -- feel free to apply -- Vince.
mdejongplain2002-03-12 18:34:24
Logged In: YES user_id=90858 I looked over the winFCmd.test tests that were failing under 98 and I am convinced they have nothing to do with this "" patch. I will create another patch to deal with them. Added to CVS on 2002-03-11.
Log in (anonymous is fine) to add a comment.
Attachments:
- win_fs.patch [download] added by mdejong on 2002-03-11 06:52:46. [details]