Tcl Source Code

View Ticket
Login
Ticket UUID: 684756
Title: compile-12.1 fails
Type: Bug Created on: 2003-02-11 17:30:12
Submitter: dgp Assigned to: msofer
Subsystem: 47. Bytecode Compiler Severity:
Priority: 9 Immediate Last modified: 2003-02-18 09:31:31
Status: Closed Closed by: msofer
Resolution: Fixed Closed on: 2003-02-18 02:31:31
Version: obsolete: 8.4.1.1
Description:
During a `make test` with a
--enable-symbols=all build of Tcl:

==== compile-12.1 testing literal leak on interp delete
FAILED
---- Result was:
99
---- Result should have been (exact matching):
0
==== compile-12.1 FAILED

FWIW, this is on a Linux/Alpha system.
User Comments:
msofer added on 2003-02-12 02:14:13:
Logged In: YES 
user_id=148712

Confirmed on linux/i386: a 57 byte leak.

It is not the earlier literal-sharing bug; the leak seems to
be in interp creation/deletion, it appears in the simplified
test

     proc getbytes {} {
set lines [split [memory info] "\n"]
lindex [lindex $lines 3] 3
    }
    
    set end [getbytes]
    for {set i 0} {$i < 5} {incr i} {
interp create foo 
interp delete foo
set tmp $end
set end [getbytes]
    }    
    rename getbytes {}
    set leak [expr {$end - $tmp}]

(i.e., compile-12.1 minus the creation of a namespace in the
new interp prior to deletion).

hobbs added on 2003-02-13 03:03:22:
Logged In: YES 
user_id=72656

possible mem leak ... hi prio.

msofer added on 2003-02-18 09:31:31:
Logged In: YES 
user_id=148712

Fixed in HEAD: 
       * generic/tclBasic.c (TclRenameCommand):
'oldFullName' object was
not being freed on all function exits, causing a memory leak 
[Bug 684756]