Skip to content
Tcl Source Code History Of Ticket b5777d3d3290348a
Login

History Of Ticket b5777d3d3290348a

Artifacts Associated With Ticket b5777d3d3290348a

  1. Ticket change [ae15e72c63] (rid 185696) by jan.nijtmans on 2020-08-25 16:03:24:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Try the following:
      
      <pre>
      $tclsh8.7
      % string index abcd 0-0x10000000000000000
      % 
      tailcall cannot find the right splicing spot: should not happen!
      Abort trap: 6
      </pre>
      
      (press "enter" twice after typing the command).
      
      I could re-produce this both on Windows 10 and on MacOS.
      
      Bisection shows that this crash is already happening since commit [bae05b9e6f], which is the TIP #502 implementation. Before that, the result was the same as in Tcl 8.6:
      
      <pre>
      $ tclsh8.6
      % string index abcd 0-10000000000000000
      bad index "0-10000000000000000": must be integer?[+-]integer? or end?[+-]integer?
      </pre>
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "jan.nijtmans"
    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: "jan.nijtmans"
    13. subsystem initialized to: "- New Builtin Commands"
    14. title initialized to: "Crash corner-case in TIP #502 implementation"
    15. type initialized to: "Bug"
  2. Ticket change [a3e4a6a59d] (rid 185700) by jan.nijtmans on 2020-08-25 16:12:01:

    1. assignee changed to: "dgp"
    2. icomment:
      Branch [bug-b5777d3d32] contains a test-case for this bug.
      
      Even though it's a corner-case very unlikely to be encounter by anyone (but ... I did ...  by pure chance ...), it's a crash waiting to happen.
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  3. Ticket change [63ce3b37e5] (rid 185701) by jan.nijtmans on 2020-08-25 16:15:03:

    1. login: "jan.nijtmans"
    2. mimetype: "text/plain"
    3. subsystem changed to: "13. Index Object"
  4. Ticket change [089887a8f0] (rid 185965) by dgp on 2020-09-01 22:28:23:

    1. icomment:
      
      Fix committed to the bug fix branch to solve the reported problem, but
      not the deeper brokenness that underlies it.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  5. Ticket change [1088c6e473] (rid 186001) by dgp on 2020-09-02 16:25:10:

    1. icomment:
      
      More direct fix is in dgp-nested-execution.
      
      Something like this may need to be done in many other places in the
      bytecode execution engine for full safety against re-entry into the
      execution engine.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  6. Ticket change [097ece2ce4] (rid 186002) by dgp on 2020-09-02 17:03:52:

    1. icomment:
      
      Similar issue was addressed in 
      
      https://core.tcl-lang.org/tcl/tktview/3138178
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  7. Ticket change [5b1bf1178d] (rid 186593) by jan.nijtmans on 2020-09-16 06:20:53:

    1. icomment:
      I'm wondering if the stack protection isn't really overkill here. How much performance does it cost in the normal case? Therefore keeping open for now. The bug-b5777d3d32 branch undoes the stack protection changes and simply uses a separate interpreter for this case always.
      
      Or .. maybe .. just parse the two parts as bigintegers and add/subtract them using libtommath's functions.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Pending"
  8. Ticket change [e86817d5a2] (rid 186599) by dgp on 2020-09-16 14:24:10:

    1. icomment:
      
      Any of those approaches will work.  I don't object to any of them.  All have
      their pros and cons.
      
      The broader issue is that we have this point of fragility in the execution
      engine.  Any function call out of TEBCresume that could possibly lead
      to nested bytecode execution is at risk without this protection.  That set of
      routines isn't stable as development continues.  Anything that permits 
      extension callbacks should get protection, and with customizable traces and
      resolvers, there are many paths that can potentially do that. A "no compromise
      on safety" approach would protect every call, or at least every call that
      passes interp as an argument.
      
      The (DE)CACHE_STACK_INFO macros themselves are tiny.  Maybe I am missing
      something, but the main effect of them seems to be that they force the more
      expensive implementation of the INST_START_CMD instruction.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  9. Ticket change [2903d3ec49] (rid 259790) by serhiy.storchaka on 2026-10-21 11:09:22:

    1. icomment:
      The crash was fixed in 9.0.0 by [fca1a2a297], with test util-9.59 (passes on trunk and 9.0). 8.6 is not affected, since TIP #502 is 8.7+. The broader question of protecting other re-entry points of the bytecode engine (see branch [/timeline?r=dgp-nested-execution|dgp-nested-execution]) can get a ticket of its own if someone wants to pursue it.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  10. Ticket change [0a3ce2550e] (rid 260057) by serhiy.storchaka on 2026-10-22 17:19:39:

    1. closedate changed to: "2461334.964846597"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"