Skip to content
Tcl Source Code History Of Ticket e3f4a8b78dec4bdb
Login

History Of Ticket e3f4a8b78dec4bdb

Artifacts Associated With Ticket e3f4a8b78dec4bdb

  1. Ticket change [309d5e9762] (rid 153310) by apnadkarni on 2017-04-26 13:31:59:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. 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.
      
    5. foundin initialized to: "8.6.6"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "apnadkarni"
    13. subsystem initialized to: "20. [interp]"
    14. title initialized to:
      Empty error message when interp limits are exceeded
      
    15. type initialized to: "Bug"
  2. Ticket change [d9613bbab3] (rid 153455) by dkf on 2017-05-02 10:50:59:

    1. assignee changed to: "dkf"
    2. 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.
      
    3. login: "dkf"
    4. mimetype: "text/html"
    5. username: "dkf"
  3. Ticket change [00d41dce6b] (rid 226681) by dkf on 2024-05-25 15:20:55:

    1. closedate changed to: "2460456.13953086"
    2. closer changed to: "dkf"
    3. icomment:
      Adding a check to the guts of `interp eval` makes this function correctly.
      
    4. login: "dkf"
    5. mimetype: "text/x-markdown"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  4. Ticket change [dea8a3404a] (rid 226682) by dkf on 2024-05-25 15:23:51:

    1. closedate changed to: "2460456.14157286"
    2. 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()`.)
      
    3. login: "dkf"
    4. mimetype: "text/x-markdown"
  5. Ticket change [c0d4abcaab] (rid 226769) by sebres on 2024-05-27 18:51:59:

    1. closer changed to: "nobody"
    2. 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.
      
    3. login: "sebres"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "Later"
    6. status changed to: "Open"
  6. Ticket change [864cbf7d4f] (rid 226773) by sebres on 2024-05-27 19:28:16:

    1. closedate changed to: "2460458.31130547"
    2. closer changed to: "sebres"
    3. icomment: "ultimately fixed in [35646a4ff27d1000]"
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"