Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-05-31
14:06 • Closed ticket [1075378fff]: C multithreaded program using TCL_interp leaks memor... artifact: b27133553e user: vasiljevic
14:03 • Ticket [1075378fff]: 4 changes artifact: 422c8af574 user: vasiljevic
09:24 • Ticket [1075378fff]: 5 changes artifact: 49a7c1f53f user: hobbs
2005-05-18
21:48 • Ticket [1075378fff]: 4 changes artifact: 7ea93d2abf user: msofer
2004-11-30
01:14 • Ticket [1075378fff]: 4 changes artifact: b30c9f5b20 user: davygrvy
01:10 • Ticket [1075378fff]: 4 changes artifact: c260bbbb8d user: davygrvy
2004-11-29
23:56 • Ticket [1075378fff]: 1 change artifact: e975d3109c user: mteira
23:55 • Ticket [1075378fff]: 4 changes artifact: d8c71b3e62 user: mteira
23:55 • Add attachment tclleak.c to ticket [1075378fff] artifact: d4936a17d1 user: mteira
16:55 • New ticket [1075378fff] C multithreaded program using TCL_interp. artifact: e25536240c user: mteira

C multithreaded program using TCL_interp leaks memory

Closed / Fixed1075378fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-11-29 16:55:33
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.
mteiraplain2004-11-29 23:55:33
File Added - 110561: tclleak.c
mteira Ticket [1075378fff]: 1 change [History diff]2004-11-29 23:56:17
davygrvyplain2004-11-30 01:10:07
Logged In: YES 
user_id=7549

lacking Tcl_FinalizeThread in thFunction().
lacking Tcl_FindExecutable() and Tcl_Finalize() in main().
davygrvyplain2004-11-30 01:14:17
Logged In: YES 
user_id=7549

whoop.. n/m..  missed seeing Tcl_FinalizeThread
msoferplain2005-05-18 21:48:02
Logged In: YES 
user_id=148712

Dave: should this ticket be closed as invalid?
hobbsplain2005-05-31 09:24:59
Logged In: YES 
user_id=72656

Zoran - is this related to your recent fix?
vasiljevicplain2005-05-31 14:03:51
Logged In: YES 
user_id=95086

It is. You can safely close this one.
vasiljevic Closed ticket [1075378fff]. [History diff]2005-05-31 14:06:56
Log in (anonymous is fine) to add a comment.

Attachments: