diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-11-04 01:37:55 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-11-04 01:37:55 (GMT) |
commit | 3e6a8effaded504ae2e5c836620c08eb5b4f0e68 (patch) | |
tree | 864d59cd45281c257b7b9b8fbb0ca46b2ec776c2 /tests/trace.test | |
parent | 05dc17a9876e3f7fedbf33d15d7302fa7a5a278d (diff) | |
download | tcl-3e6a8effaded504ae2e5c836620c08eb5b4f0e68.zip tcl-3e6a8effaded504ae2e5c836620c08eb5b4f0e68.tar.gz tcl-3e6a8effaded504ae2e5c836620c08eb5b4f0e68.tar.bz2 |
* generic/tclBasic.c (TEOVI): fix por possible leak of a Command
in the presence of execution traces that delete it.
* generic/tclBasic.c (TEOVI):
* tests/trace.test (trace-21.11): fix for [Bug 1590232], execution
traces may cause a second command resolution in the wrong
namespace.
Diffstat (limited to 'tests/trace.test')
-rw-r--r-- | tests/trace.test | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test index a85bda2..32e1b4e 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.26.2.16 2006/04/11 14:37:05 dgp Exp $ +# RCS: @(#) $Id: trace.test,v 1.26.2.17 2006/11/04 01:37:56 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1624,6 +1624,24 @@ test trace-21.10 {trace execution: TCL_EVAL_GLOBAL} testevalobjv { set ::info } {SUCCESS 1 SUCCESS 1} +test trace-21.11 {trace execution and alias} -setup { + set res {} + proc ::x {} {return ::} + namespace eval a {} + proc ::a::x {} {return ::a} + interp alias {} y {} x +} -body { + lappend res [namespace eval ::a y] + trace add execution ::x enter { + rename ::x {} + proc ::x {} {return ::} + #} + lappend res [namespace eval ::a y] +} -cleanup { + namespace delete a + rename ::x {} +} -result {:: ::} + proc factorial {n} { if {$n != 1} { return [expr {$n * [factorial [expr {$n -1 }]]}] } return 1 |