Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 96993f2046763ce4779752de6b9cf6b8fc179152
Ticket: 736426ffffffffffffffffffffffffffffffffff
memory leaks in tclThreadAlloc.c
User & Date: mistachkin on 2003-05-12 11:28:51
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    generic/tclThreadAlloc.c 
    
    1. We have the static file variables: 
    
    static Tcl_Mutex *listLockPtr; 
    static Tcl_Mutex *objLockPtr; 
    
    2. They are allocated via TclpNewAllocMutex, which 
    BOTH allocates memory via malloc AND calls 
    InitializeCriticalSection on the contained critical 
    section. 
    
    3. Neither the block of memory nor the critical 
    section are ever freed. 
    
    4. This applies to the above static variables and 
    to any other mutexes allocated via 
    TclpNewAllocMutex.
    
    5. There needs to be a new function in 
    tclThreadAlloc.c, 
    called "TclFinalizeThreadAllocSubsystem", that 
    frees these mutexes (probably by calling an 
    appropriate platform specific func, yet to be 
    created, perhaps called "TclpNewFreeMutex") and 
    then calls the "TclpFinalizeThreadAllocSubsystem" 
    function for the platform specific cleanup (i've 
    created the Win32 version of this function in my 
    new patch #731356). 
    
    6. Yet another leak involves freeing the actual TLS 
    index used by the threaded memory allocator. 
    
    
  4. foundin changed to: "None"
  5. priority changed to: "9 Immediate"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "mistachkin"
  9. subsystem changed to: "41. Memory Allocation"
  10. title changed to: "memory leaks in tclThreadAlloc.c"
  11. type changed to: "Bug"