Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-07-19
16:42 • Ticket [75b8433707] memleak in oo-1.18 status still Closed with 4 other chan... artifact: f28a379927 user: dgp
16:35
[75b8433707] Revised fix for memleak in oo instance list management. check-in: 98d8d28e03 user: dgp tags: trunk
02:06 • Ticket [75b8433707] memleak in oo-1.18 status still Closed with 5 other chan... artifact: 5d18d40b15 user: dgp
2014-07-18
22:08 • Closed ticket [75b8433707]. artifact: f6239198ed user: dkf
22:05
[75b8433707] Plug a subtle memory leak in TclOO. Test suite very unhappy with this. Shoving into... closed check-in: 23be32a082 user: dkf tags: bug-75b8433707
17:21 • Ticket [75b8433707] memleak in oo-1.18 status still Open with 3 other change... artifact: 5e4ba2db43 user: dgp
16:46 • Ticket [75b8433707]: 3 changes artifact: 447654668a user: dgp
14:56 • Ticket [75b8433707]: 4 changes artifact: 8904900a03 user: dkf
13:18 • Ticket [75b8433707]: 3 changes artifact: 6c24c99bb3 user: dgp
2014-07-12
07:22 • Ticket [75b8433707]: 5 changes artifact: 6dd22a47b7 user: dkf
2014-07-11
21:31 • New ticket [75b8433707]. artifact: 453dec991b user: dgp

memleak in oo-1.18

Closed / Fixed75b84337076e4fd5b630b6a12975ef25ce6daeabCreated 12 years agoUpdated 12 years ago
Descriptionplain2014-07-11 21:31:33
==5593== 152 bytes in 1 blocks are definitely lost in loss record 4 of 6
==5593==    at 0x4A0610C: malloc (vg_replace_malloc.c:195)
==5593==    by 0x5D14E2: TclpAlloc (tclAlloc.c:699)
==5593==    by 0x43D1AE: Tcl_Alloc (tclCkalloc.c:1059)
==5593==    by 0x5A6E23: AllocObject (tclOO.c:565)
==5593==    by 0x5A9262: TclNRNewObjectInstance (tclOO.c:1724)
==5593==    by 0x5AC12D: TclOO_Class_Create (tclOOBasic.c:198)
==5593==    by 0x5AEB90: TclOOInvokeContext (tclOOCall.c:303)
==5593==    by 0x5AB364: TclOOObjectCmdCore (tclOO.c:2584)
Referenced by2
  • 98d8d28e03[75b8433707] Revised fix for memleak in oo instance list management. check-in2014-07-19 16:35:59
  • 23be32a082[75b8433707] Plug a subtle memory leak in TclOO. Test suite very unhappy with this. Shoving into a mistake branch until that's sorted. check-in2014-07-18 22:05:16
dkf Ticket [75b8433707]: 5 changes [History diff]2014-07-12 07:22:25
dgpplain2014-07-18 13:18:01
This leak appears to be introduced by checkin

211541cc9ec23f38b93e7343a5cfefa2b9412cf7 2010-01-30 16:33:25 UTC
dkfhtml2014-07-18 14:56:31

That's quite a large commit, none of which is related to TclOO. Any hope of identifying what's really going on?

(The test itself is checking that a global command name doesn't cause problems with a local object name during create, but I can't see how that commit could have anything to do with that test as it doesn't use unset at all. All variable deletion is done by destruction of the namespace.)

dgpplain2014-07-18 16:46:01
Yeah, I suspect it may be a different leak.
dgpplain2014-07-18 17:21:35
Revised apparent leak origin:

checkout:     3e85aec4f2cb620504f3ea120e9ca28c532d560e 2012-03-26 12:51:15 UTC
dkfhtml2014-07-18 22:08:07

That was indeed the origin, and it was a subtle problem with the interlock mechanism that stopped weird delete race conditions between an instance going because of its name getting deleted and because of its class going. Evil.

One-line fix plus test.

dgpplain2014-07-19 02:06:18
Pushed the checkin off the trunk, because the test suite
was crashing terribly with it.

Looking deeper now it appears that the trouble arises
when slave interps are deleted.
dgpplain2014-07-19 16:42:12
Repaired and recommitted to the trunk.

It's possible the repair technique has broader application.
Log in (anonymous is fine) to add a comment.