summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2003-09-19 18:09:41 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2003-09-19 18:09:41 (GMT)
commit3d577ed4a3ab384c78a4b333c7a21d085acd255f (patch)
tree459559618fe93fabf03e6d626417aa5e51f210fd /tests
parentbe5eee52adacf1bd8b62748f672f5026b9ce127b (diff)
downloadtcl-3d577ed4a3ab384c78a4b333c7a21d085acd255f.zip
tcl-3d577ed4a3ab384c78a4b333c7a21d085acd255f.tar.gz
tcl-3d577ed4a3ab384c78a4b333c7a21d085acd255f.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..80b65ab 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.14 2003/09/19 18:09:41 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