Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2984 C multithreaded program using TCL_interp leaks memory

obsolete: 8.4.8
closed-fixed
5
2005-05-31
2004-11-29
Manuel Teira Paz
No

The attached C program worked fine with tcl8.4.6.
Testing against tcl8.4.7, tcl8.4.8 and cvs trunk it
leaks a lot of memory. I've tested it with the same
results on Linux (Debian Woody) and sparc Solaris 2.8.
The configure invocation was:
./configure --enable-threads --enable-shared

The test program tries to source a script called
test.tcl and evaluates a procedure on that script. It's
enough an script like this:

cat test.tcl

proc test {
set varA 1
set varB 2
}

Once compiled, the program can be executed :
./tclleak 5 1000 (for example)
With tcl8.4.6 it only takes 4Mb of maximum memory, with
tcl8.4.7 and higher versions, it takes more than 150Mb.

Discussion

  • Test C program

     
    Attachments
    • summary: C multithreaded program using TCL_interp --> C multithreaded program using TCL_interp leaks memory
     
  • Logged In: YES
    user_id=7549

    lacking Tcl_FinalizeThread in thFunction().
    lacking Tcl_FindExecutable() and Tcl_Finalize() in main().

     
  • Logged In: YES
    user_id=7549

    whoop.. n/m.. missed seeing Tcl_FinalizeThread

     
  • miguel sofer
    miguel sofer
    2005-05-18

    Logged In: YES
    user_id=148712

    Dave: should this ticket be closed as invalid?

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-05-31

    Logged In: YES
    user_id=72656

    Zoran - is this related to your recent fix?

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-05-31

    • assigned_to: andreas_kupries --> vasiljevic
     
  • Logged In: YES
    user_id=95086

    It is. You can safely close this one.

     
    • status: open --> closed-fixed