summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/compile.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/compile.test b/tests/compile.test
index dfa5770..abadee0 100644
--- a/tests/compile.test
+++ b/tests/compile.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: compile.test,v 1.13 2001/10/12 21:04:15 msofer Exp $
+# RCS: @(#) $Id: compile.test,v 1.14 2001/11/19 21:04:42 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -286,6 +286,19 @@ test compile-12.2 {testing error on literal deletion} {memDebug execCommandExist
set res
} 0
+# Special test for underestimating the maxStackSize required for a
+# compiled command. A failure will cause a segfault in the child
+# process.
+test compile-13.1 {testing underestimate of maxStackSize in list cmd} {
+ set body {set x [list}
+ for {set i 0} {$i < 3000} {incr i} {
+ append body " $i"
+ }
+ append body {]; puts OK}
+ regsub BODY {proc crash {} {BODY}; crash} $body script
+ list [catch {exec [info nameofexecutable] << $script} msg] $msg
+} {0 OK}
+
# cleanup
catch {rename p ""}
catch {namespace delete test_ns_compile}