Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 13dd8e3d5b3099092ee356acc43ee4f58713845f
Ticket: 1904907fffffffffffffffffffffffffffffffff
Fix [chan create]/return dict key finalization order issues
User & Date: dgp on 2008-03-07 06:03:28
Changes

  1. icomment:
    Logged In: YES 
    user_id=80530
    Originator: NO
    
    
    Apparently several of us testing
    with the demo script are seeing
    different failures.  The one I see
    happens because Tcl_GetReturnOptions()
    is called after Tcl_FinalizeThread().
    
    The "fix" (workaround?) is to add
        keys[i] = NULL;
    at the right place in the ReleaseKeys()
    routine, so that in this scenario, the
    GetKeys() can re-initialize.  This stops
    the crash, but adds a memleak, so I don't
    want to commit without more analysis.
    This is looking like a finalization order
    dependency mess to untangle.
    
    Another way out would be to just take
    the whole GetKeys() business out (perhaps
    conditioned on TclInExit() ?) and force
    the routines using it to created their
    key values on demand instead of pulling
    from a per-thread cache.
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. username: "dgp"