summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2003-09-19 18:42:59 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2003-09-19 18:42:59 (GMT)
commit20f6ea1d4ca61eeffeec277217f46727bb825841 (patch)
tree5e604df17f4519d2784b3d54c821d66fa5af248d /tests
parent1acf9b7241eaddbf7682f4985b33b9c5eaf5b4a6 (diff)
downloadtcl-20f6ea1d4ca61eeffeec277217f46727bb825841.zip
tcl-20f6ea1d4ca61eeffeec277217f46727bb825841.tar.gz
tcl-20f6ea1d4ca61eeffeec277217f46727bb825841.tar.bz2
* generic/tclExecute.c: adding (DE)CACHE_STACK_INFO() pairs to
protect all calls that may cause traces on ::errorInfo or ::errorCode to corrupt the stack [Bug 804681]
Diffstat (limited to 'tests')
-rw-r--r--tests/execute.test10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/execute.test b/tests/execute.test
index ab51d1a..2f7363c 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.13 2003/02/25 16:18:54 msofer Exp $
+# RCS: @(#) $Id: execute.test,v 1.13.2.1 2003/09/19 18:43:00 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -713,6 +713,14 @@ test execute-7.34 {Wide int handling} {longIs32bit} {
expr {wide(0x1) * 1024 * 1024 * 1024 * 1024}
} 1099511627776
+test execute-8.1 {Stack protection} {
+ # If [Bug #804681] has not been properly
+ # taken care of, this should segfault
+ proc whatever args {llength $args}
+ trace add variable ::errorInfo {write unset} whatever
+ catch {expr {1+9/0}}
+} 1
+
# cleanup
if {[info commands testobj] != {}} {
testobj freeallvars