Skip to content
Tcl Source Code History Of Ticket 1899164fff
Login

History Of Ticket 1899164fff

Artifacts Associated With Ticket 1899164fff

  1. Ticket change [d6ec06cb6b] (rid 123893) by dgp on 2008-02-21 21:55:45:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      The implementation of Tcl_ExprObj()
      tries to detect when the Tcl_Obj
      passed in is a PRECOMPILED "bytecode"
      value, and then validate interps and
      forgive any epoch expiration before
      executing the bytecode.
      
      This is incorrect, because a PRECOMPILED
      value has been compiled as a script to
      produce the bytecode, and that bytecode
      is not a valid set of instructions to
      interpret the same string as an expression.
      ([eval {0}] and [expr {0}] are different!)
      
      Worse still, the cleanup stages at the
      end of Tcl_ExprObj() will free the bytecode,
      and since PRECOMPILED values suppress the
      original string rep., the original bytecode
      will be lost with no way to recover it.
      
      Attached is a patch to make Tcl_ExprObj()
      do the only sensible thing -- raise an
      error.
      
      No one has noticed this, probably because
      it appears difficult and unnatural to
      pass a PRECOMPILED value to Tcl_ExprObj(),
      possibly even requiring internals intrusion
      to accomplish it.
      
      If there's a way to create a test case for
      this with reasonable effort in either the
      Tcl or the tbcload test suite, I'd appreciate
      that contribution.  Otherwise, just review
      and commit this fix please.
      
      
    4. foundin initialized to: "obsolete: 8.5.1"
    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: "dgp"
    10. subsystem initialized to: "47. Bytecode Compiler"
    11. title initialized to: "Tcl_ExprObj and PRECOMPILED scripts"
    12. type initialized to: "Bug"
  2. Ticket change [5814854798] (rid 117743) by dgp on 2008-02-22 04:55:46:

    1. icomment:
      
      
      File Added - 267449: precompexpr.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [f1770a5744] (rid 109367) by dgp on 2008-02-22 22:11:18:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      The problem is more widespread
      than I thought:
      
      % proc 0+0 {} {return WTF?}
      % set script { 0+0 }
       0+0
      % time $script
      34 microseconds per iteration
      % expr $script
      WTF?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [e498e2eaa9] (rid 87980) by dgp on 2008-02-22 22:11:19:

    1. icomment:
      
      
      File Deleted - 267449: 
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. title changed to: "Tcl_ExprObj and cached bytecode"
    5. username: "dgp"
  5. Ticket change [8fa5ddfcf0] (rid 120312) by dgp on 2008-02-22 22:16:55:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      % proc 0+0 {} {return WTF?}
      % set script 0+0
      0+0
      % time $script
      40 microseconds per iteration
      % expr $script
      WTF?
      % append script { }
      0+0
      % expr $script
      0
      % time $script
      5 microseconds per iteration
      % expr $script
      0
      % if 1 $script
      0
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [cc1af8f618] (rid 95637) by dgp on 2008-02-23 00:15:18:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      I misread the codePtr->refCount
      management, so I was wrong about
      the danger of losing the precompiled
      bytecode.
      
      Because cached bytecode is not
      so transient, the dangers of
      using the wrong bytecodes do
      flow both ways.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. title changed to: "Cached bytecode not typed; expr vs. script"
    5. username: "dgp"
  7. Ticket change [ad5faa14f5] (rid 101461) by dgp on 2008-02-23 00:36:37:

    1. assignee changed to: "msofer"
    2. foundin changed to: "obsolete: 8.4.18"
    3. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      this isn't about tbcload anymore,
      so assigning to msofer for assistance
      when he returns.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. username: "dgp"
  8. Ticket change [58a27ea52b] (rid 117838) by dgp on 2008-03-05 01:52:13:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      tests committed
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "dgp"
  9. Ticket change [8a119deadc] (rid 127328) by dgp on 2008-03-05 01:52:32:

    1. assignee changed to: "dgp"
  10. Ticket change [a960cd793a] (rid 99139) by dgp on 2008-03-08 02:26:48:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Fixed on HEAD for 8.5.2.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Ticket change [d5ea1d04d3] (rid 123716) by dgp on 2008-03-08 04:08:54:

    1. closedate changed to: "2008-03-07T21:08:54"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      and fixed for 8.4.19 too.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"