Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 26e2d2adbf1928d07f0455ab066e06f881f05a17
Ticket: 1909647fffffffffffffffffffffffffffffffff
TclStackFree: incorrect freePtr. Call out of sequence?
User & Date: msofer on 2008-03-11 20:30:33
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    Originator: NO
    
    On the timing issue: TclStackAlloc/TclStackFree is a very specialised internal allocator, it reserves memory in Tcl's internal stack. It is of the utmost importance for its proper functioning that frees occur in the precise reverse sequence of allocs (*), or else get a panic. What you are seeing is a violation of this timing principle.
    
    Had this happened in a single thread, the crash would be deterministic - an obvious bug with a slim chance of making it past the testing phase. However, if different threads are allocing/freeing from the same interp's stack (shouldn't happen as the stack is interp-specific), thread coordination issues could cause the observed behaviour. This is what I suspect. Not much of a clue beyond that yet.
    
    (*) They should also be precisely coordinated with the bytecode engine's own usage of the stack. This is an internal allocator that is not meant to be used by extensions.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"