Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2011-09-20
20:51 • Ticket [3393280fff] iortrans-11.0 leaks status still Closed with 4 other cha... artifact: eb9616d908 user: dgp
2011-09-19
23:23 • Ticket [3393280fff]: 4 changes artifact: afca04f5f0 user: dgp
2011-08-20
03:28 • Closed ticket [3393280fff]. artifact: 86036af5b9 user: dgp
03:04 • Ticket [3393280fff]: 4 changes artifact: 401d4edacc user: andreas_kupries
02:58 • Ticket [3393280fff]: 1 change artifact: 651116690a user: dgp
02:58 • Ticket [3393280fff]: 4 changes artifact: 9186e3fd3b user: dgp
02:34 • Ticket [3393280fff]: 4 changes artifact: b473ae7f8c user: dgp
2011-08-17
19:16 • New ticket [3393280fff]. artifact: 696ea12e52 user: dgp

iortrans-11.0 leaks

Closed / Fixed3393280fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2011-08-17 19:16:52
$  make valgrind TESTFLAGS="-file ioTrans.test -match iortrans-11.0"
...
==2696== 405 (88 direct, 317 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 23
==2696==    at 0x4A05E1C: malloc (vg_replace_malloc.c:195)
==2696==    by 0x493654: Tcl_Alloc (in /local/tmp/dgp/fossil/tcl-only/valgrind/tcltest)
==2696==    by 0x4F3827: TclChanPushObjCmd (in /local/tmp/dgp/fossil/tcl-only/valgrind/tcltest)
==2696==    by 0x48DD49: TclNREvalObjv (in /local/tmp/dgp/fossil/tcl-only/valgrind/tcltest)
==2696==    by 0x48F4EC: TclNREvalObjEx (in /local/tmp/dgp/fossil/tcl-only/valgrind/tcltest)
==2696==    by 0x4D8996: NsEnsembleImplementationCmdNR (in /local/tmp/dgp/fossil/tcl-only/valgrind/tcltest)
==2696==    by 0x489435: TclNRRunCallbacks (in /local/tmp/dgp/fossil/tcl-only/valgrind/tcltest)
==2696==    by 0x4207B2: SlaveEval (in /local/tmp/dgp/fossil/tcl-only/valgrind/tcltest)
dgpplain2011-08-20 02:34:27
The value returned by NewReflectedTransform
(tclIORTrans.c, line 580) is what is leaking.
Suspect a missing Tcl_Release() call somewhere.
dgpplain2011-08-20 02:58:51
ReflectClose simply has a few exits
that fail to call Tcl_EventuallyFree
dgp Ticket [3393280fff]: 1 change [History diff]2011-08-20 02:58:52
andreas_kupriesplain2011-08-20 03:04:09
Oops. Sorry.

(Has ReflectClose in tclIORChan.c similar missing T_EF ?)
dgpplain2011-08-20 03:28:28
allow_comments - 1

fixed in trunk
dgpplain2011-09-19 23:23:17
This was the wrong fix.  Adding Tcl_EventuallyFree() calls
without regard to what thread its called from started reporting
"free Tcl_Obj in wrong thread" errors with memory debugging on.

I expect to have a proper fix done soon.
dgpplain2011-09-20 20:51:35
fix on the trunk now should be better,
Log in (anonymous is fine) to add a comment.