Skip to content
Tcl Source Code History Of Ticket 705406ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 705406ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 705406ffffffffffffffffffffffffffffffffff

  1. Ticket change [9c4f1bdff8] (rid 96128) by dgp on 2003-03-18 05:20:04:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Assigned to Group 8.4b1 because that's where this
      first appeared.  This bug is still present in 8.4.2 and
      the HEAD.  I suspect the broken commit was:
      
      2002-07-03  Miguel Sofer  <[email protected]>
      
              * generic/tclCompCmds.c (TclCompileCatchCmd):
      return
                TCL_OUT_LINE_COMPILE instead of TCL_ERROR:
      let the failure
                happen at runtime so that it can be caught
      [Bug 577015].
      
      Here's a sample session to demo the problem:
      
      % proc foo {} {catch {if 1 {set a [b]; if {a} {}}}}
      % foo
      GetCmdLocEncodingSize: bad code length
      Abort
      
      Key elements:
      
      1) a [proc] so that we get the bytecode compiler involved.
      2) a [catch] as the first command in the proc.
      3) within the first command in the [catch],...
      4) first there is a [command substitution],....
      5) then there is a parsing syntax error
      
      Seems that the partial compiles don't get properly
      cleaned up, when the compile of [catch] gets
      abandoned due to the syntax error, leading to
      the panic.
      
      Another example:
      
      % proc foo {} {catch {if {[a]} {if b {}}}}
      % foo
      GetCmdLocEncodingSize: bad code length
      Abort
      
    4. foundin initialized to: "obsolete: 8.4b1"
    5. priority initialized to: "8"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "47. Bytecode Compiler"
    10. title initialized to: "panic when compiling [catch]"
    11. type initialized to: "Bug"
  2. Ticket change [3ce4718f36] (rid 120989) by msofer on 2003-03-20 05:37:33:

    1. closedate changed to: "2003-03-19T22:37:33"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      envPtr->numCommands was not being restored to its correct
      value after encountering the compilation error. Fixed.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "msofer"