#4813 auto_index leaks memory at interp delete

obsolete: 8.5.5
closed-out-of-date
5
2011-03-22
2011-03-22
No

In: proc auto_load_index, the code:
eval [read $f]
leaks memory at each interpreter delete

This replacement test code:
set ::dir $dir
namespace eval :: source [file join $dir tclIndex]
unset ::dir
does not leak

Examples:
proc leakTest1 {} {set i [interp create]; $i eval set auto_noload true; catch {$i eval xx}; interp delete $i}; # No Leak
proc leakTest2 {} {set i [interp create]; catch {$i eval xx}; interp delete $i}; # Leak!!!!!
proc leakTest3 {} {set i [interp create]; $i eval history; interp delete $i}; # Leak!!!!!

Discussion

  • Henning Godske

    Henning Godske - 2011-03-22

    Runs on home build imbedded Tcl on HP-UX PA-RISC (64 bits)

     
  • Henning Godske

    Henning Godske - 2011-03-22
    • labels: 105661 --> 38. Init - Library - Autoload
     
  • Don Porter

    Don Porter - 2011-03-22

    Thanks for the report. What is the evidence of the leak?

     
  • Don Porter

    Don Porter - 2011-03-22
    • assigned_to: hobbs --> dgp
     
  • Henning Godske

    Henning Godske - 2011-03-22

    To test the leak run (in Tcl interp):

    while 1 leakTest3

    and observe the process size. This will be constantly increasing.

    Changing the "eval [read $f]" with the workaround, no process size increase is seen.

     
  • Don Porter

    Don Porter - 2011-03-22

    Confirmed leakTest2 in Tcl 8.5.5.
    No longer leaking in Tcl 8.5.9.
    Upgrade.

     
  • Henning Godske

    Henning Godske - 2011-03-22

    Will upgrade and confirm.
    Thanks :-)

     
  • Don Porter

    Don Porter - 2011-03-22

    Leaks were first fixed in release 8.5.8,
    though not reported in the Tracker.

     
  • Don Porter

    Don Porter - 2011-03-22
    • status: open --> closed-out-of-date
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks