summaryrefslogtreecommitdiffstats
path: root/tests/execute.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/execute.test')
-rw-r--r--tests/execute.test24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/execute.test b/tests/execute.test
index 9075b28..0f02e01 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.18 2004/05/25 17:17:38 dgp Exp $
+# RCS: @(#) $Id: execute.test,v 1.19 2004/10/28 17:21:25 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -739,6 +739,28 @@ test execute-8.2 {Stack restoration} -body {
interp recursionlimit {} $limit
} -result {too many nested evaluations (infinite loop?)}
+test execute-8.3 {Stack restoration} -body {
+ # Test for [Bug #1055676], correct restoration
+ # of the stack top after the epoch is bumped and
+ # the stack is grown in a call from a nested evaluation
+ set arglst [string repeat "a " 1000]
+ proc f {args} "f $arglst"
+ proc run {} {
+ # bump the interp's epoch
+ rename ::set ::dummy
+ rename ::dummy ::set
+ catch f msg
+ set msg
+ }
+ run
+ } -setup {
+ # Avoid crashes when system stack size is limited (thread-enabled!)
+ set limit [interp recursionlimit {}]
+ interp recursionlimit {} 100
+ } -cleanup {
+ interp recursionlimit {} $limit
+ } -result {too many nested evaluations (infinite loop?)}
+
# cleanup
if {[info commands testobj] != {}} {
testobj freeallvars