.
D 2002-03-10T23:52:46
J assignee hobbs
J cmimetype text/plain
J comment I\snoticed\sthat\sTcl\sis\snot\sable\sto\smake\sit\sthrough\nthe\stests\sin\swinFCmd.test\swithout\scrashing\sor\ngoing\sinto\san\sinfinite\sloop\sunder\sWindows\s98.\n\nI\screated\sthis\spatch,\swhich\sfixes\sthe\scrashes\nand\sreturns\sENOENT\swhen\sa\spath\slike\s""\sis\npassed\sin.\sThe\scomments\sfor\sthese\sfunctions\nstate\sthat\sENOENT\sshould\sbe\sreturned,\sbut\sI\nam\snot\ssure\sthat\sjives\swith\sthe\stest\scases\nin\swinFCmd.test.\sI\swould\sask\sthat\ssomeone\nrun\sthe\stests\sin\swinFCmd.test\sunder\sNT\sto\nsee\sif\sthis\spatch\schanges\sany\sof\sthe\stest\nresults.\sFurther\schanges\sto\sthe\sexpected\ntest\sresults\smay\sbe\sneeded,\sbut\sI\sam\snot\ssure\nhow\sthe\s98/NT\sthing\splays\sinto\sit\sjust\snow.\n\nAlso,\sthis\spatch\schanges\sa\scheck\sthat\slooked\nlike\sso:\n\nif\s(tclWinProcs->useWide)\s{\n\s\sif\s(((WCHAR\s*)\snativePath)[0]\s==\s'\\0')\s{\n\s\s\s\sTcl_SetErrno(ENOENT);\n\s\s\s\s\s\sreturn\sTCL_ERROR;\n\s\s}\n}\selse\s{\n\s\sif\s(((char\s*)\snativePath)[0]\s==\s'\\0')\s{\n\s\s\s\sTcl_SetErrno(ENOENT);\n\s\s\s\sreturn\sTCL_ERROR;\n\s\s}\n}\n\nto:\n\nif\s(nativePath\s==\sNULL\s||\snativePath[0]\s==\s'\\0')\s{\n\s\sTcl_SetErrno(ENOENT);\n\s\sreturn\sTCL_ERROR;\n}\n\n\nI\scould\snot\ssee\sany\sreason\sto\smake\sthis\sextra\nuseWide\scheck,\sso\sI\stook\sa\speek\sat\sthe\sgenerated\nASM:\n\n9:\s\s\s\s\s\s\s\s\s\s\s\scond\s=\s((WCHAR\s*)\spath[0]\s==\s'\\0');\n0040102A\s\s\smov\s\s\s\s\s\s\s\s\seax,dword\sptr\s[path]\n0040102D\s\s\smovsx\s\s\s\s\s\s\secx,byte\sptr\s[eax]\n00401030\s\s\sneg\s\s\s\s\s\s\s\s\secx\n00401032\s\s\ssbb\s\s\s\s\s\s\s\s\secx,ecx\n00401034\s\s\sinc\s\s\s\s\s\s\s\s\secx\n00401035\s\s\smov\s\s\s\s\s\s\s\s\sdword\sptr\s[cond],ecx\n10:\s\s\s\s\s\s\s}\selse\s{\n00401038\s\s\sjmp\s\s\s\s\s\s\s\s\smain+38h\s(00401048)\n11:\s\s\s\s\s\s\s\s\s\s\scond\s=\s((char\s*)\spath[0]\s==\s'\\0');\n0040103A\s\s\smov\s\s\s\s\s\s\s\s\sedx,dword\sptr\s[path]\n0040103D\s\s\smovsx\s\s\s\s\s\s\seax,byte\sptr\s[edx]\n00401040\s\s\sneg\s\s\s\s\s\s\s\s\seax\n00401042\s\s\ssbb\s\s\s\s\s\s\s\s\seax,eax\n00401044\s\s\sinc\s\s\s\s\s\s\s\s\seax\n00401045\s\s\smov\s\s\s\s\s\s\s\s\sdword\sptr\s[cond],eax\n\nThe\scode\scertainly\slooks\sexactly\sthe\ssame,\nexcept\sfor\sthe\sregisters\sthat\sare\sused.\nSince\sI\scould\snot\scome\sup\swith\sany\sreason\nfor\sthis\sextra\scomplexity,\sI\sremoved\sit.\n
J foundin None
J priority 9\sImmediate
J resolution None
J status Open
J submitter mdejong
J subsystem 37.\sFile\sSystem
J title Fix\sfilesystem\scrashed\sunder\swin98
J type Patch
K 528284ffffffffffffffffffffffffffffffffff
U mdejong
Z ac5e19cf0154468a753cdf6eb310612b