Overview
| Artifact ID: | d70f0147ba4b7373d9d716a40aca1af1db95280a |
|---|---|
| Ticket: | 731754ffffffffffffffffffffffffffffffffff
tls index leak/inconsistencies in tclThreadAlloc.c, etc |
| User & Date: | nobody on 2003-05-03 09:00:35 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed 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 - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "49. Threading"
- title changed to: "inconsistencies in tclThreadAlloc.c, etc"
- type changed to: "Bug"