Skip to content
Tcl Source Code History Of Ticket 2030670fffffffff
Login

History Of Ticket 2030670fffffffff

Artifacts Associated With Ticket 2030670fffffffff

  1. Ticket change [07f2d02a36] (rid 89490) by ajpasadyn on 2008-07-28 20:23:44:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I have an application that often panics (TclStackFree: incorrect freePtr. Call out of sequence?) when using the tcllib smtp package to send an e-mail message.  Unfortunately, even after I identified the Tcl issue, I wasn't able to use that information to produce a test case that didn't contain any private data.  I could trap the arguments to the "subst" call that was failing, but when run in isolation, the problem never appeared.  In fact, removing even completely unrelated procedures and commands from the script would cause the failure to go away.
      
      Since I could make it happen reliably, I was able to find out what was wrong.  I had assumed some memory was getting trashed somewhere, but it actually just looks like an issue with a code path that is really hard to get to.  Basically TclStackRealloc usually just ends up returning its input pointer, but if you can get it to return something else the old one is still in the sequence.  When I debugged it, I saw that the "move" input to GrowEvaluationStack was getting repurposed (and set to zero) in my case, and that was causing the only code I could see that was adjusting the pointer sequences to get skipped.  So I added a separate variable for the other usage and it seems to be working for me.  Please take a look at this and suggest something else if this patch would cause other problems.
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.5.3"
    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: "ajpasadyn"
    10. subsystem initialized to: "47. Bytecode Compiler"
    11. title initialized to: "Tcl_Panic in Tcl_ScanObjCmd after TclStackRealloc"
    12. type initialized to: "Bug"
  2. Add attachment "tclstack.patch" [1f4da714bb] (rid 91128) by ajpasadyn on 2008-07-29 03:23:44.

  3. Ticket change [54c434e6d3] (rid 94006) by ajpasadyn on 2008-07-29 03:23:44:

    1. icomment:
      
      
      File Added - 286290: tclstack.patch
      
      
      
    2. login: "ajpasadyn"
    3. mimetype: "text/plain"
    4. username: "ajpasadyn"
  4. Add attachment "panic_stacktrace.txt" [8199604152] (rid 117066) by ajpasadyn on 2008-07-29 03:24:42.

  5. Ticket change [82f62291df] (rid 117315) by ajpasadyn on 2008-07-29 03:24:42:

    1. icomment:
      
      
      File Added - 286291: panic_stacktrace.txt
      
      Logged In: YES 
      user_id=1055638
      Originator: YES
      
      File Added: panic_stacktrace.txt
      
      
    2. login: "ajpasadyn"
    3. mimetype: "text/plain"
    4. username: "ajpasadyn"
  6. Ticket change [1f381b8f1b] (rid 91110) by ajpasadyn on 2008-07-29 03:25:32:

    1. icomment:
      
      
      File Added - 286292: stack_alloc_calls.txt
      
      Logged In: YES 
      user_id=1055638
      Originator: YES
      
      File Added: stack_alloc_calls.txt
      
      
    2. login: "ajpasadyn"
    3. mimetype: "text/plain"
    4. username: "ajpasadyn"
  7. Add attachment "stack_alloc_calls.txt" [37a2b70ecb] (rid 112062) by ajpasadyn on 2008-07-29 03:25:32.

  8. Ticket change [1da6aef3fe] (rid 90847) by msofer on 2008-07-29 03:40:11:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      The problem seems to appear when allocating 0 bytes and then reallocating so that it doesn't firt in the current stack. This ends up moving 0 bytes ... I get it. 
      Your patch looks fine, thank you - I'll test and commit this week.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "msofer"
  9. Ticket change [817772da67] (rid 117040) by msofer on 2008-07-29 20:51:55:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      Tested, committed: thanks again. Leaving open as reminder to add tests.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "5 Medium"
    5. resolution changed to: "Fixed"
    6. username: "msofer"
  10. Ticket change [1fd73f2983] (rid 91215) by ajpasadyn on 2008-07-29 21:41:13:

    1. icomment:
      Logged In: YES 
      user_id=1055638
      Originator: YES
      
      I am curious to see how to test that with a simple-looking script.  I'm sure there's some way to get the stacks into the right state easily, but I could not find it!
      
      
    2. login: "ajpasadyn"
    3. mimetype: "text/plain"
    4. username: "ajpasadyn"
  11. Ticket change [f6f2b02e0f] (rid 130401) by msofer on 2008-07-29 22:00:39:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      Testing this probably requires a special function in tclTest.c. I also cannot see a script that would reliably trigger this, even less accross future changes.
      
      What the test would have to do is: StackAlloc 0 bytes and then realloc in a manner that is sure to trigger an actual move (it can peek at the current stack's size and request more than that!)
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  12. Ticket change [239c07155d] (rid 130969) by msofer on 2009-05-01 08:30:09:

    1. priority changed to: "6"
  13. Ticket change [c922ffd148] (rid 122230) by msofer on 2011-04-12 09:34:27:

    1. priority changed to: "4"