[clock] alias in safe slave
Closed / Invalid2379689fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 17 years ago
Descriptionplain2008-12-02 21:44:39
I notice in the SlaveCreate() routine:
/*
* The [clock] command presents a safe API, but uses unsafe features in
* its implementation. This means it has to be implemented in safe interps
* as an alias to a version in the (trusted) master.
*/
if (safe) {
Tcl_Obj *clockObj;
int status;
TclNewLiteralStringObj(clockObj, "clock");
Tcl_IncrRefCount(clockObj);
status = AliasCreate(interp, slaveInterp, masterInterp, clockObj,
clockObj, 0, NULL);
Tcl_DecrRefCount(clockObj);
if (status != TCL_OK) {
goto error2;
}
}
return slaveInterp;
error:
TclTransferResult(slaveInterp, TCL_ERROR, interp);
error2:
Tcl_DeleteInterp(slaveInterp);
What is the reason to bypass the reporting of
the error message when failure to create the
[clock] alias lead to failure to create the
slave interp?
kennykbplain2009-10-29 09:35:52
I thought that AliasCreate reports the problem in 'interp', not 'slaveInterp', so the error message should already be in place when we hit 'goto error2'. Did I err?
kennykb Pending ticket [2379689fff].
[History diff]2009-10-29 09:35:58
dgpplain2009-10-29 21:42:58
D'oh!
dgpplain2009-10-29 21:43:05
allow_comments - 1
Log in (anonymous is fine) to add a comment.