Setting limits on the current interpreter calls Tcl_Panic()
Closed / Fixed3398794fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2011-08-26 16:46:56
Trying to set an interp limit on the current interpreter calls Tcl_Panic().
$ tclsh8.6
% interp limit {} time -command foo
installing limit callback to the limited interpreter
Abort trap (core dumped)
The backtrace points to the lines 4156-4158 of generic/tclInterp.c, which reads
if (interp == targetInterp) {
Tcl_Panic("installing limit callback to the limited interpreter");
}
This fact is:
* Not documented in the interp manual page.
* An incorrect use of Tcl_Panic() IMO. Simply ignoring the request or generating a standard, [catch]eable error is enough.
egavilanplain2011-08-28 08:02:44
More brokenness due to this design choice:
$ tclsh8.6
% set i [interp create -safe]
interp0
% $i eval {interp limit {} time -command foo}
installing limit callback to the limited interpreter
Abort trap (core dumped)
dkfplain2011-08-29 21:47:27
My fault, as I should have added protection against this situation in the Tcl command; this is hitting a trap in the lower-level C API. Also panics in 8.5 (expected; 8.6 hasn't had any updates in this area).
dkfplain2011-08-30 07:24:31
allow_comments - 1
Log in (anonymous is fine) to add a comment.