From 00b6fcde15446d336d2a2778a8f541064a725c5f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 22 Sep 2010 17:21:03 +0000 Subject: * tests/execute.test: added execute-10.3 for [Bug 3072640]. The test causes a mem failure. --- ChangeLog | 3 +++ tests/execute.test | 23 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 29c20f3..74fcaea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-09-22 Miguel Sofer + * tests/execute.test: added execute-10.3 for [Bug 3072640]. The + test causes a mem failure. + * generic/tclExecute: protect all possible writes to ::errorInfo or ::errorCode with DECACHE_STACK_INFO(), as they could run traces. The new calls to be protected are Tcl_ResetResult(), diff --git a/tests/execute.test b/tests/execute.test index ce21040..9e5b1f6 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.35 2010/04/05 19:44:45 ferrieux Exp $ +# RCS: @(#) $Id: execute.test,v 1.36 2010/09/22 17:21:03 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -993,6 +993,27 @@ test execute-10.2 {Bug 2802881} -setup { interp delete slave } -returnCodes error -match glob -result * +test execute-10.3 {Bug 3072640} -setup { + proc generate {n} { + for {set i 0} {$i < $n} {incr i} { + yield $i + } + } + proc t {args} { + incr ::foo + } + trace add execution ::generate enterstep ::t +} -body { + coroutine coro generate 5 + trace remove execution ::generate enterstep ::t + set ::foo +} -cleanup { + unset ::foo + rename generate {} + rename t {} + rename coro {} +} -result 4 + # cleanup if {[info commands testobj] != {}} { testobj freeallvars -- cgit v0.12