Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
The lineCLPtr hashtable structure is being leaked. The entire objThreadMap hashtable and its contained data are also being leaked.
This bug also applies to the 8.5 branch.
Can you describe the code path you are considering ?
Are you calling Tcl_Exit or Tcl_Finalize ?
Remember that since the exit reform of 2001201, Tcl_Exit only calls the finalizer of the calling thread. Another way of missing a finalizer in Tcl_Exit, even if no extra threads are created, is the test on currentAppExitPtr. Can you say which scenario you are reporting ?
Attached initial patch. Sorry for the previous blank comment, SF UI is acting weird.
Review patch ... Looks ok, after some thinking.
Agreed, applies to 8.5 as well. 8.5 actually has the whole TclFinalizeThreadObjects() function missing.
Patch applies ok, modulo ChangeLog entry.
I see no test cases however. How can I check the leak from the testsuite ?
Applied patch to head and 8.5 branches. Please check in your environ that the leaks are gone.
My system passes testsuite before and after.
It would be very hard to duplicate the leaks from the existing test suite since the leaks are per-thread and are only really seen after Tcl_Finalize is called. Just ran my tests here and the leaks appear to be fixed in HEAD. Thanks.
Corrected some issues with this in both HEAD and core-8-5-branch.