Skip to content
Tcl Source Code History Of Ticket 731754ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 731754ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 731754ffffffffffffffffffffffffffffffffff

  1. Ticket change [d70f0147ba] (rid 123912) by nobody on 2003-05-03 09:00:35:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      In the CVS HEAD version of tclThreadAlloc.c, near 
      line #279, the following lines of code can be found:
      
      #ifdef WIN32
          TlsFree((DWORD) cachePtr);
      #else
          free(cachePtr);
      #endif
      
      After seeing this code and, I investigated it more 
      carefully to see if I could more precisely figure out 
      it's implications.  Here are my preliminary 
      conclusions:
      
      #1. It turns out that calling TlsFree on cachePtr is 
      NOT correct.
      
      #2. Calling free() on it produces a very strange 
      crash in PutBlocks (null pointer dereference on line 
      826).
      
      #3. In an attempt to fix this problem, I moved the 
      call to TlsFree to tclWinThrd.c, where it really 
      belongs anyhow. However, calling TlsFree on 
      the "key" static variable in this file, which is what 
      cachePtr is based on, does not produce good 
      results.
      
      I am not sure how to fix this problem because I 
      believe it may point to deeper issues with the 
      threaded memory allocator. Any help on this issue, 
      and more generally, my non-TLS patch, would be 
      greatly appreciated.
      
      If indeed TlsFree (or it's new non-TLS equivalent) 
      must be called from tclThreadAlloc.c, it would 
      make my patch a lot cleaner if TclFreeAllocCache 
      called into a wrapper function residing in 
      tclWinThrd.c, where I can use my new non-TLS 
      thread storage subsystem if necessary.
      
      JJM
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "49. Threading"
    10. title initialized to: "inconsistencies in tclThreadAlloc.c, etc"
    11. type initialized to: "Bug"
  2. Ticket change [7abdf9cba3] (rid 90382) by mistachkin on 2003-05-03 16:01:56:

    1. assignee changed to: "msofer"
    2. priority changed to: "7 High"
  3. Ticket change [e251387b14] (rid 87601) by mistachkin on 2003-05-03 18:17:53:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      Apparently, the TLS index for the threaded memory 
      allocator is never freed.  Therefore, it is being leaked 
      upon load/unload/reload of the Tcl DLL.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. title changed to:
      tls index leak/inconsistencies in tclThreadAlloc.c, etc
      
    6. username: "mistachkin"
  4. Ticket change [45f80aabe9] (rid 99435) by msofer on 2003-05-04 00:02:02:

    1. assignee changed to: "mistachkin"
    2. icomment:
      Logged In: YES 
      user_id=148712
      
      Back to Joe: I have no relevant knowledge on these matters :(
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  5. Ticket change [523f75e6e0] (rid 126282) by mistachkin on 2003-05-05 13:13:41:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=113501
      
      It appears, based on CVS history, that this is JeffH's 
      area.  Assigning to him.
      
      
      
    3. login: "mistachkin"
    4. mimetype: "text/plain"
    5. username: "mistachkin"
  6. Ticket change [cf0145ee7c] (rid 112884) by mistachkin on 2003-05-05 13:15:26:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      This bug is fixed in my Win32 NON-Tls thread storage 
      patch.
      
      patch #731356
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  7. Ticket change [2d0c2fe37b] (rid 119013) by mistachkin on 2003-05-10 05:49:34:

    1. assignee changed to: "mistachkin"
  8. Ticket change [1670ce898e] (rid 124720) by mistachkin on 2003-05-10 06:38:02:

    1. closedate changed to: "2003-05-09T23:38:02"
    2. closer changed to: "mistachkin"
    3. icomment:
      Logged In: YES 
      user_id=113501
      
      Memory leak fixed. all platforms now call:
      
      free(cachePtr);
      
      The more general problem of when to free the TLS index 
      for the threaded memory allocator has been solved by 
      my Win32 non-TLS patch.  However, I'm in the middle of 
      reworking it to make it more modular before it's 
      committed.
      
      
      
    4. login: "mistachkin"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "mistachkin"