summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-09-10 22:17:21 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-09-10 22:17:21 (GMT)
commit7e17c358eb7a149fbec81f4c2e5d1adefcc90bdd (patch)
tree8cfd6122f896908d6d15672eac7b86987ff352a9
parent893b3f3b6945cbed2de0e75bf3b0ce06ceaf391c (diff)
downloadtcl-7e17c358eb7a149fbec81f4c2e5d1adefcc90bdd.zip
tcl-7e17c358eb7a149fbec81f4c2e5d1adefcc90bdd.tar.gz
tcl-7e17c358eb7a149fbec81f4c2e5d1adefcc90bdd.tar.bz2
[cee90e4e88] Correct error in stack depth checking.
-rw-r--r--generic/tclCompCmdsSZ.c1
-rw-r--r--tests/error.test6
2 files changed, 7 insertions, 0 deletions
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index 28cab1e..ed9c088 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -3038,6 +3038,7 @@ IssueTryClausesInstructions(
if (!handlerTokens[i]) {
forwardsNeedFixing = 1;
JUMP4( JUMP, forwardsToFix[i]);
+ TclAdjustStackDepth(1, envPtr);
} else {
int dontChangeOptions;
diff --git a/tests/error.test b/tests/error.test
index 0de644c..af07ed7 100644
--- a/tests/error.test
+++ b/tests/error.test
@@ -1184,6 +1184,12 @@ test error-21.8 {memory leaks in try: Bug 2910044} memory {
}
} 0
+test error-21.9 {Bug cee90e4e88} {
+ # Just don't panic.
+ apply {{} {try {} on ok {} - on return {} {}}}
+} {}
+
+
# negative case try tests - bad "trap" handler
# what is the effect if we attempt to trap an errorcode that is not a list?
# nested try