Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-10-18
18:23 • Ticket [2871908fff] leaking two hashtables and some data in tclObj.c status ... artifact: 30578f8e48 user: mistachkin
2009-10-09
03:31 • Ticket [2871908fff]: 4 changes artifact: 44d9310cdf user: mistachkin
2009-10-08
06:12 • Closed ticket [2871908fff]. artifact: 09770c3c59 user: andreas_kupries
05:43 • Ticket [2871908fff]: 4 changes artifact: 2735efcfba user: andreas_kupries
2009-10-06
10:03 • Ticket [2871908fff]: 1 change artifact: 922fabd10b user: mistachkin
2009-10-05
04:46 • Ticket [2871908fff]: 4 changes artifact: b624a58c41 user: mistachkin
04:45 • Add attachment leaks.diff to ticket [2871908fff] artifact: 977ae66174 user: mistachkin
04:45 • Ticket [2871908fff] leaking two hashtables and some data in tclObj.c status ... artifact: 81a65d4f60 user: mistachkin
04:44 • Ticket [2871908fff]: 4 changes artifact: 624d22ab25 user: mistachkin
2009-10-03
02:57 • Ticket [2871908fff]: 4 changes artifact: b037ba3328 user: ferrieux
2009-10-02
16:59 • New ticket [2871908fff]. artifact: 4c4a3c2500 user: mistachkin

leaking two hashtables and some data in tclObj.c

Closed / Fixed2871908fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-10-02 16:59:45
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.
ferrieuxplain2009-10-03 02:57:54
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 ?
mistachkin Ticket [2871908fff]: 4 changes [History diff]2009-10-05 04:44:33
mistachkinplain2009-10-05 04:45:46
File Added - 345329: leaks.diff
mistachkinplain2009-10-05 04:46:50
Attached initial patch.  Sorry for the previous blank comment, SF UI is acting weird.
mistachkin Ticket [2871908fff]: 1 change [History diff]2009-10-06 10:03:44
andreas_kupriesplain2009-10-08 05:43:53
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 ?
andreas_kupriesplain2009-10-08 06:12:32
allow_comments - 1

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.
mistachkinplain2009-10-09 03:31:47
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.
mistachkinplain2009-10-18 18:23:16
Corrected some issues with this in both HEAD and core-8-5-branch.
Log in (anonymous is fine) to add a comment.

Attachments: