Skip to content
Tcl Source Code History Of Ticket 1522803
Login

History Of Ticket 1522803

Artifacts Associated With Ticket 1522803

  1. Ticket change [d5d4f81a37] (rid 123699) by kennykb on 2006-07-14 21:35:09:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      On an arithmetic error, such as division by zero,
      the backtrace in ::errorInfo shows the last previous
      error, rather than the current error.
      
      Behold:
      
      % catch {unset foo(bar)}; set c 0; expr {1/$c}
      divide by zero
      % set errorInfo
      can't unset "foo(bar)": no such variable
          while executing
      "unset foo(bar)"
          invoked from within
      "expr {1/$c}"
      
      I'm looking at this briefly, but don't expect
      to solve it quickly, and hope that one of the
      other developers that understands the bytecode
      engine might have a keener insight.
      
    4. foundin initialized to: "obsolete: 8.5a4"
    5. priority initialized to: "7 High"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "kennykb"
    9. subsystem initialized to: "45. Parsing and Eval"
    10. title initialized to: "wrong backtrace on arithmetic error"
    11. type initialized to: "Bug"
  2. Ticket change [d6d59eb735] (rid 123874) by dgp on 2006-07-18 00:07:37:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      can someone confirm this
      problem only shows up in
      an interactive interp?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [c3f38ea060] (rid 111762) by kennykb on 2006-07-18 00:41:20:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      I confirm that it fails only in an interactive interpreter.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  4. Ticket change [6bde94256d] (rid 128397) by dgp on 2006-07-18 02:54:27:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      To demo in a non-interactive
      shell, use the script:
      
        set c 0
        if 1 {
          catch {set foo}
          expr {1/$c}
        }
      
      The interactive / non-interactive
      is just a proxy for compiled /
      direct evaluation, and its
      bytecompilation one must force
      to demo the bug.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [fe43b39925] (rid 108552) by dgp on 2006-07-18 10:08:57:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Between revisions 1.153 and
      1.154 of tclExecute.c, there
      were several conversions like:
      
      -    Tcl_ResetResult(interp);
      -    Tcl_AppendToObj(Tcl_GetObjResult(interp), "divide by
      zero", -1);
      +    Tcl_SetObjResult(interp, Tcl_NewStringObj("divide by
      zero", -1));
      
      The loss of the Tcl_ResetResult()
      call means the loss of a clearing
      of the ERR_ALREADY_LOGGED flag,
      leading to the observed bug.
      
      This may just be the exposing trigger
      with the real cause the E_A_L reform
      that happened earlier.  still examining...
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [482d45bd05] (rid 99837) by dgp on 2006-07-18 10:16:36:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Making that same conversion
      on core-8-4-branch leads to
      the same bug, even though no
      ERR_ALREADY_LOGGED reform
      was done on that branch.
      
      The real cause is the loss
      of several Tcl_ResetResult()
      calls in the bytecode execution
      engine that had real useful 
      flag clearing effects in addition
      to initializing an empty result
      to append to.
      
      Simple fix is to put them all back.
      Better fix might be to find where
      one call might go to get the function
      done where it's needed.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [dc9afb5ad3] (rid 114509) by dgp on 2006-07-21 00:17:35:

    1. assignee changed to: "msofer"
    2. icomment:
      
      
      File Added - 185569: 1522803.patch
      
      Logged In: YES 
      user_id=80530
      
      
      Please test/review this
      patch.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  8. Add attachment "1522803.patch" [83914dffd2] (rid 117406) by dgp on 2006-07-21 00:17:35.

  9. Ticket change [d7e9abfec3] (rid 107350) by msofer on 2006-07-21 17:48:44:

    1. closedate changed to: "2006-07-21T10:48:44"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      Worth recording dgp's explanation in the chat: "the entire
      patch is general reform. Do the reset operation in the one
      right place, not here, there, and everywhere."
      
      Looks good to me; gets the same 196 failures as unpatched :)
      Committed.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "msofer"
  10. Ticket change [e16ccec0b2] (rid 87445) by dgp on 2006-07-21 22:00:35:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      The commit brought in some
      unrelated changes to
      tclInt.h and tclObj.c.
      
      I took those back out.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"