#4846 --enable-symbols=all mem leaks

obsolete: 8.6b1.1
pending-fixed
Don Porter
9
2011-07-15
2011-07-07
Don Porter
No

With a --enable-symbols=all build of the Tcl trunk...

==== compile-12.1 testing literal leak on interp delete FAILED
==== Contents of test case:

set end [getbytes]
for {set i 0} {$i < 5} {incr i} {
interp create foo
foo eval {
namespace eval bar {}
}
interp delete foo
set tmp $end
set end [getbytes]
}
set leakedBytes [expr {$end - $tmp}]

---- Result was:
344
---- Result should have been (exact matching):
0
==== compile-12.1 FAILED

Discussion

  • Don Porter
    Don Porter
    2011-07-07

    Also:

    ==== oo-call-1.18 object call introspection - memory leaks FAILED
    ==== Contents of test case:

    leaktest {
    info object call oo::object destroy
    }

    ---- Result was:
    414
    ---- Result should have been (exact matching):
    0
    ==== oo-call-1.18 FAILED

    ==== oo-call-2.13 class call introspection - memory leaks FAILED
    ==== Contents of test case:

    leaktest {
    info class call oo::class destroy
    }

    ---- Result was:
    414
    ---- Result should have been (exact matching):
    0
    ==== oo-call-2.13 FAILED

    ==== oo-call-3.2 current call introspection FAILED
    ==== Contents of test case:

    oo::class create A {
    superclass root
    method x {} {self call}
    }
    oo::class create B {
    superclass A
    method x {} {self call;next}
    }
    B create y
    oo::objdefine y method x {} {self call;next}
    leaktest {
    y x
    }

    ---- Result was:
    3225
    ---- Result should have been (exact matching):
    0
    ==== oo-call-3.2 FAILED

     
  • Don Porter
    Don Porter
    2011-07-07

    • summary: --enable-symbols=all mem leak --> --enable-symbols=all mem leaks
     
  • Don Porter
    Don Porter
    2011-07-07

    bisect points blame on fbb4a85f92e91308a079
    which was the removal of TclCleanupLiteralTable.

    This was ok in 8.5, and got merged to trunk without
    testing.

    It really ought to be ok on trunk too. I suspect when
    TCLT is in place it's working around/papering over
    some other memleak.

     
  • miguel sofer
    miguel sofer
    2011-07-08

    TclCleanupLiteralTable had the following comment:

    - /*
    - * It is tempting simply to walk each hash bucket once and delete the
    - * internal representations of each literal in turn. It's also wrong.
    - * The problem is that freeing a literal's internal representation can
    - * delete other literals to which it refers, making nextPtr invalid.
    - * So each time we free an internal rep, we start its bucket over
    - * again.
    - */

    TclDeleteLiteralTable does not seem to be minding this special scenario. Could this be the bug's cause?

     
  • Don Porter
    Don Porter
    2011-07-12

    The oo leaks are older.

     
  • Don Porter
    Don Porter
    2011-07-12

    Ticket 3365156 opened to track that
    separately.

     
  • Don Porter
    Don Porter
    2011-07-15

    This is a reappearance of 467523.

    Committing fix to trunk. If we're happy with it,
    we can consider backporting.

     
  • Don Porter
    Don Porter
    2011-07-15

    • status: open --> pending-fixed