Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tcl_SplitPath(NULL, &ac, &av) crashes

Closed / Wont Fix426135ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2001-05-22 01:14:51
when calling Tcl_SplitPath(NULL, argcPtr, argvPtr), I
am receiving a segmentation violation.  I know, why
would you call this function with a NULL.  In my case,
I was calling it in conjunction with
Tcl_GetNameOfExecutable

Tcl_SplitPath(Tcl_GetNameOfExecutable(),&argcPtr,
&argvPtr);

This is causing the error.

I believe that Tcl_SplitPath() should return NULL and
0 when passed a NULL path.
hobbsplain2001-05-22 09:01:04
Logged In: YES 
user_id=72656

Tcl_SplitPath is not defined to take a NULL first arg, 
which is to say that it requires a non-NULL one.  Since 
this is an old function, I would recommend not changing it 
as that may lead to the invalid perception that NULL may be 
passed safely (which would only be valid in 8.4+).  I think 
we'll have to stick with checking for NULL.
Log in (anonymous is fine) to add a comment.