|
2011-03-22
| ||
| 20:58 | • Closed ticket [3234175fff]: auto_index leaks memory at interp delete plus 7 ... artifact: 603f57272f user: dgp | |
| 20:58 | • Ticket [3234175fff]: 4 changes artifact: f1600311da user: dgp | |
| 20:26 | • Ticket [3234175fff]: 4 changes artifact: 97d60f87e5 user: hgo | |
| 20:10 | • Ticket [3234175fff]: 4 changes artifact: f80e005e7b user: dgp | |
| 20:03 | • Ticket [3234175fff]: 4 changes artifact: 3b4512851f user: hgo | |
| 19:15 | • Ticket [3234175fff]: 1 change artifact: 3eb542cb6d user: dgp | |
| 19:15 | • Ticket [3234175fff]: 4 changes artifact: 39a0a2638f user: dgp | |
| 14:54 | • Ticket [3234175fff]: 1 change artifact: 531bad76dd user: hgo | |
| 14:50 | • Ticket [3234175fff]: 4 changes artifact: e5b90716b3 user: hgo | |
| 07:48 | • New ticket [3234175fff]. artifact: 6a4990ede1 user: hgo | |
auto_index leaks memory at interp delete
Closed / Out of Date3234175fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2011-03-22 07:48:28
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!!!!!
hgoplain2011-03-22 14:50:20
Runs on home build imbedded Tcl on HP-UX PA-RISC (64 bits)
hgo Ticket [3234175fff]: 1 change
[History diff]2011-03-22 14:54:01
dgpplain2011-03-22 19:15:41
Thanks for the report. What is the evidence of the leak?
dgp Ticket [3234175fff]: 1 change
[History diff]2011-03-22 19:15:42
hgoplain2011-03-22 20:03:29
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.
dgpplain2011-03-22 20:10:46
Confirmed leakTest2 in Tcl 8.5.5. No longer leaking in Tcl 8.5.9. Upgrade.
hgoplain2011-03-22 20:26:26
Will upgrade and confirm. Thanks :-)
dgpplain2011-03-22 20:58:41
Leaks were first fixed in release 8.5.8, though not reported in the Tracker.
dgpplain2011-03-22 20:58:42
allow_comments - 1
Log in (anonymous is fine) to add a comment.