Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tcl_FSEvalFile crashes under WinNT

Closed / Invalid628966ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-10-26 05:26:22
Line 2095 of tclWinFile.c attempts to call 
GetFileAttributesEx through a NULL pointer. This 
pointer is explicitly set to NULL on line 87 of 
tclWin32Dll.c

int main (void)
{
Tcl_Interp *interp;
Tcl_Obj *fooTcl = Tcl_NewStringObj("foo.tcl",-
1);
int error;

interp = Tcl_CreateInterp();

error = Tcl_FSEvalFile(interp, fooTcl);
if (error)
{
fputs(interp->result, stderr);
}
Tcl_DeleteInterp(interp);

return error;
}

setting asciiProcs->getFileAttributesExProc to 
GetFileAttributesExA stops the crash, but still doesn't 
function properly.
vincentdarleyplain2002-10-29 00:17:54
Logged In: YES 
user_id=32170

You must call Tcl_FindExecutable before trying to use 
other functions in the Tcl library.  Even if Tcl didn't 
crash, it wouldn't function properly without that call.

I will add some comments to the WinTcl sources to 
indicate that this is not a bug.
Log in (anonymous is fine) to add a comment.