Menu

#3712 valgrind detected memleaks

obsolete: 8.4.15
closed-fixed
None
5
2007-05-15
2007-05-10
Don Porter
No

taking the same valgrind
scripts recently run on the
HEAD, and running them on
core-8-4-branch I see two
leaks reported:

Leak #1
0: malloc (vg_replace_malloc.c:149)
1: TclpAlloc (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
2: Tcl_Alloc (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
3: AllocStringEntry (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
4: Tcl_CreateHashEntry (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
5: TclLookupSimpleVar (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
6: TclLookupVar (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
7: Tcl_SetVar2Ex (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
8: TclTeardownNamespace (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
9: DeleteInterpProc (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
-- autoMkindex.test: ==17708== 3,536 (1,706 direct, 1,830 indirect) bytes in 8 blocks are definitely lost in loss record 3 of 4

Leak #2
0: malloc (vg_replace_malloc.c:149)
1: TclpAlloc (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
2: Tcl_Alloc (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
3: Tcl_CreateNamespace (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
4: Tcl_CreateInterp (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
5: SlaveCreate (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
6: Tcl_InterpObjCmd (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
7: TclEvalObjvInternal (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
8: Tcl_EvalEx (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
9: Tcl_EvalObjEx (in /home/dgp/cvs/tcl8.4/unix/libtcl8.4.so)
-- basic.test: ==17709== 550 (240 direct, 310 indirect) bytes in 1 blocks are definitely lost in loss record 3 of 4
-- namespace.test: ==18182== 1,867 (960 direct, 907 indirect) bytes in 4 blocks are definitely lost in loss record 3 of 4

Discussion

  • Don Porter

    Don Porter - 2007-05-15

    Logged In: YES
    user_id=80530
    Originator: YES

    Leak #2 is a leak of the global
    namespace of an interp when
    the interp is deleted after
    a [namspace delete ::]. These
    scripts demo:

    interp create slave
    slave eval namespace delete ::
    interp delete slave
    proc exit args {}

    and

    namespace delete ::
    proc exit args {}

     
  • Don Porter

    Don Porter - 2007-05-15
    • status: open --> closed-fixed
     
  • Don Porter

    Don Porter - 2007-05-15

    Logged In: YES
    user_id=80530
    Originator: YES

    fix for leak # 2 committed for 8.4.15

    Re-testing after that change show no
    more leaks.

     
MongoDB Logo MongoDB