Skip to content
Tcl Source Code Artifact [bd5e1fa57b]
Login

Artifact [bd5e1fa57b]

Artifact bd5e1fa57b58b31d565a234beaba6dead0e9ef9d:

Ticket change [bd5e1fa57b] - Ticket [599376ffffffffff|599376ffff] <i>Tcl_EvalFile dosn&#39;t look in current dir</i> status still Open with 4 other changes by nobody on 2002-08-31 07:12:59.
D 2002-08-31T07:12:59
J icomment Logged\sIn:\sNO\s\n\nTest\scase\ssetup..............\n\nPrerequisite\sfor\sbuilding\stcl84.lib\sand\stcl84.dll\sbinaries.\nOtherwise,\sprogram\scrashes\sdue\sto\sNULL\sfunction\spointer.\sAnother\sbug\sin\sTCL\scode.\n\n1.\sReplace\sline#\s86\s->\sNULL,\sby\sfollowing\sline\sin\s...\\win\\tclWin32Dll.cpp\n\s\s\s\s(BOOL\s(WINAPI\s*)(CONST\sTCHAR\s*,\sGET_FILEEX_INFO_LEVELS,\sLPVOID))\sGetFileAttributesExA,\n\n2.\sReplace\sline#\s125\s->\sNULL,\sby\sfollowing\sline\sin\s...\\win\\tclWin32Dll.cpp\n\s\s\s\s(BOOL\s(WINAPI\s*)(CONST\sTCHAR\s*,\sGET_FILEEX_INFO_LEVELS,\sLPVOID))\sGetFileAttributesExW,\n\n3.\sBuild\sTCL\slib\sbinaries.\n\n\nTest\sprogram\sbegins\shere\s\n--------------------------------------BEGIN----------------------------------\n//\sTclTest.cpp\s:\sTest\sprogram\sto\sdemonstrate\sthe\sTcl_EvalFile()\sbug.\n//\n#include\s"stdafx.h"\n#include\s"direct.h"\n#include\s<tcl.h>\n#define\sSCTIPT_FILE"tclTest.tcl"\n#define\sSCTIPT_DIR"c:\\\\some\\\\dir"\n#define\sSCTIPT_FPATH"c:\\\\some\\\\dir\\\\tclTest.tcl"\n\nint\smain(int\sargc,\schar*\sargv[])\n{\nTcl_Interp*interp\s=\sTcl_CreateInterp();\nif\s(!interp)\s{\nfprintf(stderr,\s"Tcl_CreateInterp\sfailed\\n");\sreturn\s1;\n}\nif(chdir(SCTIPT_DIR))\s{\nfprintf(stderr,\s"chdir\sfailed\\n");\sreturn\s2;\n}\n////////////////\sTcl_EvalFile()\sfails.......\nif\s(Tcl_EvalFile(interp,\sSCTIPT_FILE)\s!=\sTCL_OK)\s{\nfprintf(stderr,\s"1:\sTcl_EvalFile\sfailed\\n\\tERROR:\s%s\\n",\sinterp->result);\n}\n////////////////\sTcl_EvalFile()\sfails.......here\stoo!!!!!\nif\s(Tcl_EvalFile(interp,\sSCTIPT_FPATH)\s!=\sTCL_OK)\s{\nfprintf(stderr,\s"2:\sTcl_EvalFile\sfailed\\n\\tERROR:\s%s\\n",\sinterp->result);\n}\nTcl_DeleteInterp(interp);\nreturn\s0;\n}\n--------------------------------------END----------------------------------\n\nOutput\sof\sthe\stest\sprogram\s:\n----------------------------BEGIN\sOUTPUT---------------------------\n1:\sTcl_EvalFile\sfailed\n\s\s\s\s\s\s\s\sERROR:\scouldn't\sread\sfile\s"tclTest.tcl":\sno\ssuch\sfile\sor\sdirectory\n2:\sTcl_EvalFile\sfailed\n\s\s\s\s\s\s\s\sERROR:\scouldn't\sread\sfile\s"c:\\some\\dir\\tclTest.tcl":\spermission\sdenied\n----------------------------------END\sOUTPUT------------------------\n\nStep\sthrough\sthe\sTcl_EvalFile()\scall\s.......see\sfollowing\sstack....\n\nTclpObjNormalizePath(Tcl_Interp\s*\s0x00000000,\sTcl_Obj\s*\s0x007d7198,\sint\s0x00000000)\sline\s1997\nTclNormalizeToUniquePath(Tcl_Interp\s*\s0x00000000,\sTcl_Obj\s*\s0x007d7198)\sline\s1086\s+\s15\sbytes\nFSNormalizeAbsolutePath(Tcl_Interp\s*\s0x00000000,\sTcl_Obj\s*\s0x007d7228)\sline\s1008\s+\s13\sbytes\nTcl_FSGetCwd(Tcl_Interp\s*\s0x00000000)\sline\s2025\s+\s13\sbytes\nTcl_FSGetNormalizedPath(Tcl_Interp\s*\s0x00000000,\sTcl_Obj\s*\s0x007d7270)\sline\s4293\s+\s9\sbytes\nTcl_FSGetFileSystemForPath(Tcl_Obj\s*\s0x007d7270)\sline\s4846\s+\s11\sbytes\nTcl_FSStat(Tcl_Obj\s*\s0x007d7270,\s_stati64\s*\s0x0012febc)\sline\s1554\s+\s9\sbytes\nTcl_FSEvalFile(Tcl_Interp\s*\s0x007e1100,\sTcl_Obj\s*\s0x007d7270)\sline\s1334\s+\s13\sbytes\nTcl_EvalFile(Tcl_Interp\s*\s0x007e1100,\sconst\schar\s*\s0x00420090\s??_C@_0M@OJLM@tclTest?4tcl?$AA@)\sline\s234\s\n+\s13\sbytes\nmain(int\s0x00000001,\schar\s*\s*\s0x00900e90)\sline\s26\s+\s17\sbytes\nmainCRTStartup()\sline\s206\s+\s25\sbytes\nKERNEL32!\sGetProcessPriorityBoost\s+\s279\sbytes\n----------------END\sSTACK\sTRACE------------\n\nThe\sTclpObjNormalizePath(interp,\spathPtr,\snextCheckpoint)\sis\sentered\swith\spathPtr=\sTcl_Obj("c:/some/dir")\nand\snextCheckpoint=\s0.\n\nThis\sfunction\sis\sbroke....\sit\sreturns\s"<drive>:/"\s(eg."C:/")\sfor\swhatever\sdir\spath\sis\spassed\sto\sit.\n\nThanks\sfor\syour\ssupport.\n\n-Prashant\[email protected]\n
J login nobody
J mimetype text/plain
J username nobody
K 599376ffffffffffffffffffffffffffffffffff
U nobody
Z b36b5dfa592664d8f87565abc58f01a6