Skip to content
Tcl Source Code History Of Ticket 82e7f673254fd008
Login

History Of Ticket 82e7f673254fd008

Artifacts Associated With Ticket 82e7f673254fd008

  1. Ticket change [144e5c4580] (rid 137807) by andy on 2014-04-29 22:54:40:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Version [4492d3b64521aaee] introduced a SIGSEGV when the following code is executed:
      
      apply {{} {string length [string replace ___! 0 2 ab]}}
      
    5. foundin initialized to: "4492d3b64521aaee"
    6. is_private initialized to: "0"
    7. login: "andy"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "662c23482b0bf6a505f39e48fb7ad43af8dee4d3"
    10. resolution initialized to: "None"
    11. severity initialized to: "Critical"
    12. status initialized to: "Open"
    13. submitter initialized to: "andy"
    14. subsystem initialized to: "47. Bytecode Compiler"
    15. title initialized to: "SIGSEGV due to [string replace]"
    16. type initialized to: "Bug"
  2. Ticket change [e57ad08bc9] (rid 137808) by aku on 2014-04-29 23:09:27:

    1. assignee changed to: "dkf"
    2. login: "aku"
    3. mimetype: "text/plain"
  3. Ticket change [59156f2f06] (rid 137809) by anonymous on 2014-04-30 01:11:06:

    1. icomment:
      apply {{} {
        set a [join {a b} {}]
        puts [string length [string replace ___! 0 2 $a]]  ;# doesn't crash
        puts [string length [string replace ___! 0 2 $a[unset a]]]  ;# crashes
      }}
      
      it looks like it can happen when the replacement is unshared (suggesting it's trying to edit in place?)
      
      possible cause at tclExecute.c:5705 - the only way into that block is when value3Ptr is unshared, then it's used as the result, and the refcount is subsequently decremented, and the result obj gets freed.
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  4. Ticket change [81a9a196c7] (rid 137819) by dkf on 2014-04-30 20:58:14:

    1. icomment:
      Your longer <tt>apply</tt> crashes for me (and will be a reasonable test case with adjustment). Your analysis is likely right too.
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. priority changed to: "9 Immediate"
    5. username: "dkf"
  5. Ticket change [3e83e6c5da] (rid 137825) by dkf on 2014-04-30 21:26:15:

    1. closedate changed to: "2456778.39323309"
    2. closer changed to: "dkf"
    3. icomment:
      We now have tests that check for both releasing the refcount too early, and also for not releasing the refcount at all (a memory leak) and we now pass those tests.
      
    4. login: "dkf"
    5. mimetype: "text/html"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"
  6. Ticket change [305f50e8ae] (rid 137826) by andy on 2014-04-30 21:48:41:

    1. closedate changed to: "2456778.4088174"
    2. closer changed to: "andy"
    3. icomment:
      Well, that strange.  I apologize for the typo.  In the original ticket, I had meant to say [join {a b} {}] instead of simply ab.  The point was to get an unshared value.  Sorry again for the misdirection, and thanks for the fix.
      
    4. login: "andy"
    5. mimetype: "text/plain"
  7. Ticket change [a6fba27dfa] (rid 137841) by dkf on 2014-05-01 09:04:51:

    1. closedate changed to: "2456778.87837497"
    2. closer changed to: "dkf"
    3. icomment:
      Not a problem, but I might look into other ways to generate the string to insert (so that it will stay unshared even if we optimise further).
      
    4. login: "dkf"
    5. mimetype: "text/html"
    6. username: "dkf"