Skip to content
Tcl Source Code History Of Ticket 3059758fffffffff
Login

History Of Ticket 3059758fffffffff

Artifacts Associated With Ticket 3059758fffffffff

  1. Ticket change [7180fbcacd] (rid 100690) by ferrieux on 2010-09-05 10:14:14:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When tracing instructions (tclTraceExec==3), returns from procedure calls typically look like:
      
             ... no enclosing catch, returning TCL_OK
          LEVEL:  DEPTH (PC) INST args => ... after "PROCNAME": TCL_OK, result="1"
      
      where PC and INST/args are the position and instruction to be executed just after the return.
      However, when the return code is not TCL_OK, the PC is off by one, and is the last byte of the previous instruction (typically invokeXXX), and consequently the INST is random (possibly an immediate operand interpreted as an opcode):
      
         ... no enclosing catch, returning TCL_ERROR
       LEVEL:  DEPTH (WRONG PC) WRONG INST => TCL_ERROR, result= "..."
      
      Of course this is a very tiny issue, but tracing instructions accurately is key to understanding the delicate operation of TEBC, and this microbug has been annoying in the course of the investigation of Patch 2995655. The fix/insight could help both.
      
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "ferrieux"
    10. subsystem initialized to: "47. Bytecode Compiler"
    11. title initialized to:
      tclTraceExec==3 : wrong pc+INST on uncaught error return
      
    12. type initialized to: "Bug"
  2. Ticket change [e748092d6b] (rid 104429) by ferrieux on 2010-09-06 06:10:48:

    1. icomment:
      The 'pc--' after the nonRecursiveCallReturn: label is the reason. I know it is necessary, so that the pc goes back into the range of the offending instruction, so that TIP 280 info can be recomputed from it, but subsequently a stronger contract is expected: namely that *pc be the inst itself:
      
          processExceptionReturn:
      #if TCL_COMPILE_DEBUG
      switch (*pc) {
                  ...
      
      So, the conflict must be resolved, either by giving up the pretty printing of the offending inst, or by using the pc-indexing data in TIP 280 to crawl back to the beginning of the inst (conditionally on TCL_COMPILE_DEBUG).
       
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  3. Ticket change [dd3ff852ac] (rid 114637) by ferrieux on 2010-09-20 03:53:55:

    1. icomment:
      Attaching example: traccexec.tcl, and generated output, out.txt.
      The following line from the output has an invalid pc and instruction:
      
            1:  3 (7) pop => TCL_ERROR, result= "Yo"
      
      since offset 7 is not the beginning of an instruction:
      
        Command 1: "B x x"
          (0) push1 0 # "B"
          (2) push1 1 # "x"
          (4) push1 1 # "x"
          (6) invokeStk1 3 
          (8) done 
      
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  4. Ticket change [499f56240f] (rid 100082) by ferrieux on 2010-09-20 03:54:39:

    1. icomment:
      
      
      File Added - 387181: traceexec.tcl
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  5. Add attachment "traceexec.tcl" [88879322b6] (rid 131880) by ferrieux on 2010-09-20 03:54:39.

  6. Ticket change [eaefc19192] (rid 103450) by ferrieux on 2010-09-20 03:55:15:

    1. icomment:
      
      
      File Added - 387182: out.txt
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  7. Add attachment "out.txt" [d7a4bceab8] (rid 124028) by ferrieux on 2010-09-20 03:55:15.

  8. Ticket change [35f45e3246] (rid 107035) by ferrieux on 2010-09-20 04:02:28:

    1. icomment:
      Attaching a patch that at least brings back a valid pc and inst, though it is the instruction _following_ the one which is erroring. Though it is not entirely acceptable for the current purpose, this patch uses a new local in TEBC, pcBeg, that is also needed for 2995655.
      
      Miguel, please review :}
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  9. Add attachment "traceinst.patch" [d145c4cb2d] (rid 113320) by ferrieux on 2010-09-20 04:03:24.

  10. Ticket change [e54c759dbb] (rid 88103) by ferrieux on 2010-09-20 04:03:25:

    1. icomment:
      
      
      File Added - 387183: traceinst.patch
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  11. Ticket change [53e9128332] (rid 93840) by msofer on 2011-04-12 09:39:24:

    1. assignee changed to: "ferrieux"