summaryrefslogtreecommitdiffstats
path: root/tests/trace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-09-06 00:20:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-09-06 00:20:29 (GMT)
commitff4a267f0be445ca56e06e36c671c793b307814d (patch)
treed99a89309a9578a6b6ac63ba1a17570abe96486f /tests/trace.test
parent97f74cddc8704cd7c70a4f0e34dfaed1f1ddbfed (diff)
downloadtcl-ff4a267f0be445ca56e06e36c671c793b307814d.zip
tcl-ff4a267f0be445ca56e06e36c671c793b307814d.tar.gz
tcl-ff4a267f0be445ca56e06e36c671c793b307814d.tar.bz2
* generic/tclBasic.c (TclRenameCommand,CallCommandTraces):
* tests/trace.test (trace-27.1): Corrected memory leak when a rename trace deleted the command being traced. Test added. Thanks to Hemang Lavana for the fix. [Bug 604609]
Diffstat (limited to 'tests/trace.test')
-rw-r--r--tests/trace.test9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 10c70c9..0c21dc3 100644
--- a/tests/trace.test
+++ b/tests/trace.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: trace.test,v 1.21 2002/07/29 00:25:50 msofer Exp $
+# RCS: @(#) $Id: trace.test,v 1.22 2002/09/06 00:20:29 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1830,6 +1830,13 @@ test trace-26.2 {trace targetCmd when invoked through an alias} {
set info
} {{foo {foo 1 2} enter}}
+test trace-27.1 {memory leak in rename trace (604609)} {
+ catch {rename bar {}}
+ proc foo {} {error foo}
+ trace add command foo rename {rename foo "" ;#}
+ rename foo bar
+ info commands foo
+} {}
# Delete procedures when done, so we don't clash with other tests
# (e.g. foobar will clash with 'unknown' tests).