Artifacts Associated With Ticket e3f4a8b78d
Ticket change [309d5e9762] (rid 153310) by apnadkarni on 2017-04-26 13:31:59:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
See the following console session % interp create slave slave % set cmdlimit [slave eval {info cmdcount}] 280 % slave limit command -value [incr cmdlimit 5] % slave limit time -seconds 600 % slave eval [list expr 1+3] % set errorInfo while executing "expr 1+3" invoked from within "slave eval [list expr 1+3]" ("uplevel" body line 1) invoked from within "uplevel #0 {slave eval [list expr 1+3]}" % set errorCode NONE The time limit is in the past (it was actually a programming error, should have been absolute time, not relative). An error was generated as expected. However the error message is empty and error code is NONE (expected to be TCL LIMIT) resulting in my trap handler not firing. - foundin initialized to: "8.6.6"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "20. [interp]"
- title initialized to:
Empty error message when interp limits are exceeded
- type initialized to: "Bug"
Ticket change [d9613bbab3] (rid 153455) by dkf on 2017-05-02 10:50:59:
- assignee changed to: "dkf"
- icomment:
I reproduced this with the tip of the 8.6 branch: <pre> interp create slave set cmdlimit [slave eval {info cmdcount}] slave limit command -value $cmdlimit catch {slave eval [list expr 1+3]} msg1 opt1 puts «$msg1» puts $opt1 catch {slave eval [list expr 1+3]} msg2 opt2 puts «$msg2» puts $opt2 </pre> Output: <pre> «command count limit exceeded» -errorstack {INNER push1} -errorcode {TCL LIMIT COMMANDS} -errorinfo {command count limit exceeded while executing "expr 1+3" invoked from within "slave eval [list expr 1+3]"} -errorline 1 -code 1 -level 0 «» -errorstack {INNER {expr 1+3}} -errorcode NONE -errorinfo { while executing "expr 1+3" invoked from within "slave eval [list expr 1+3]"} -errorline 1 -code 1 -level 0 </pre> Looks like it is a failure due to trying to run code in an environment where the trap has already fired. - login: "dkf"
- mimetype: "text/html"
- username: "dkf"
Ticket change [00d41dce6b] (rid 226681) by dkf on 2024-05-25 15:20:55:
- closedate changed to: "2460456.13953086"
- closer changed to: "dkf"
- icomment:
Adding a check to the guts of `interp eval` makes this function correctly.
- login: "dkf"
- mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [dea8a3404a] (rid 226682) by dkf on 2024-05-25 15:23:51:
- closedate changed to: "2460456.14157286"
- icomment:
... that is, a limit check prior to transferring the work to the child interpreter. (Specifically, it's a call to `Tcl_LimitCheck()` in `ChildEval()` before `TclEvalObjEx()`/`Tcl_EvalObjEx()`.)
- login: "dkf"
- mimetype: "text/x-markdown"
Ticket change [c0d4abcaab] (rid 226769) by sebres on 2024-05-27 18:51:59:
- closer changed to: "nobody"
- icomment:
But then this is not a solution ([b740e2abbd44c7d0] is rather a workaround) - because it'd work only for the case where tcl reaches the limit by interp eval (inside the tcl-level command from tcl level), but would continue to eat the error message if the limit reached calling the code internally (via C API), so by direct or NRE invocation, e. g. using Tcl_EvalObjv, Tcl_EvalObjEx, TclNREvalObjEx and co from the C-side. The interp eval (or ChildEval) has nothing to do with the origin of the bug. I have another solution for the bug somewhere (it works on my side without patching ChildEval)... Searching in my fork.
- login: "sebres"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Later"
- status changed to: "Open"
Ticket change [864cbf7d4f] (rid 226773) by sebres on 2024-05-27 19:28:16:
- closedate changed to: "2460458.31130547"
- closer changed to: "sebres"
- icomment: "ultimately fixed in [35646a4ff27d1000]"
- login: "sebres"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"