summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclExecute.c5
-rw-r--r--tests/execute.test17
2 files changed, 19 insertions, 3 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 5d33e3c..87695ba 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -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: tclExecute.c,v 1.397 2008/08/04 18:32:29 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.398 2008/08/05 15:52:23 msofer Exp $
*/
#include "tclInt.h"
@@ -2712,7 +2712,8 @@ TclExecuteByteCode(
DECACHE_STACK_INFO();
- result = TclNREvalObjv(interp, objc, objv, TCL_EVAL_NOERR, NULL);
+ result = TclNREvalObjv(interp, objc, objv,
+ (*pc == INST_EVAL_STK) ? 0 : TCL_EVAL_NOERR, NULL);
result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1);
CACHE_STACK_INFO();
diff --git a/tests/execute.test b/tests/execute.test
index 6c34dc1..d9f02e0 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.28 2008/08/04 04:49:24 dgp Exp $
+# RCS: @(#) $Id: execute.test,v 1.29 2008/08/05 15:52:24 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -958,6 +958,21 @@ test execute-8.4 {Compile epoch bump effect on stack trace} -setup {
rename FOO {}
} -result {}
+test execute-8.5 {Bug 2038069} -setup {
+ proc demo {} {
+ catch [list error FOO] m o
+ return $o
+ }
+} -body {
+ demo
+} -cleanup {
+ rename demo {}
+} -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO
+ while executing
+"error FOO"
+ invoked from within
+"catch [list error FOO] m o"} -errorline 2}
+
test execute-9.1 {Interp result resetting [Bug 1522803]} {
set c 0
catch {