diff options
author | dgp <dgp@users.sourceforge.net> | 2007-08-13 23:07:35 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-08-13 23:07:35 (GMT) |
commit | a789ab33c1944041459d117c719d57c44582b717 (patch) | |
tree | 010b01e269f67758c5fd56095f5438dec9f8cfe5 | |
parent | 03a98e8337487e74191cf5e805cc9d8a5481e952 (diff) | |
download | tcl-a789ab33c1944041459d117c719d57c44582b717.zip tcl-a789ab33c1944041459d117c719d57c44582b717.tar.gz tcl-a789ab33c1944041459d117c719d57c44582b717.tar.bz2 |
* generic/tclExecute.c: Provide DECACHE/CACHE protection to the
* tests/trace.test: Tcl_LogCommandInfo() call. [Bug 1773040]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclExecute.c | 4 | ||||
-rw-r--r-- | tests/trace.test | 14 |
3 files changed, 21 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2007-08-13 Don Porter <dgp@users.sourceforge.net> + + * generic/tclExecute.c: Provide DECACHE/CACHE protection to the + * tests/trace.test: Tcl_LogCommandInfo() call. [Bug 1773040] + 2007-08-12 Miguel Sofer <msofer@users.sf.net> * generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macro diff --git a/generic/tclExecute.c b/generic/tclExecute.c index abb30e8..a54ee92 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -12,7 +12,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.312 2007/08/09 12:20:07 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.313 2007/08/13 23:07:36 dgp Exp $ */ #include "tclInt.h" @@ -6511,7 +6511,9 @@ TclExecuteByteCode( if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { bytes = GetSrcInfoForPc(pc, codePtr, &length); if (bytes != NULL) { + DECACHE_STACK_INFO(); Tcl_LogCommandInfo(interp, codePtr->source, bytes, length); + CACHE_STACK_INFO(); } } iPtr->flags &= ~ERR_ALREADY_LOGGED; diff --git a/tests/trace.test b/tests/trace.test index c2d7b17..2646502 100644 --- a/tests/trace.test +++ b/tests/trace.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: trace.test,v 1.57 2007/08/09 12:20:08 msofer Exp $ +# RCS: @(#) $Id: trace.test,v 1.58 2007/08/13 23:07:37 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -246,6 +246,18 @@ test trace-2.6 {trace variable writes on compiled local} { p set info } {x X write 0 willy} +test trace-2.7 {trace variable writes on errorInfo} -body { + # + # Check correct behaviour of write traces on errorInfo. + # [Bug 1773040] + trace add variable ::errorInfo write traceScalar + catch {set dne} + lrange [set info] 0 2 +} -cleanup { + # always remove trace on errorInfo otherwise further tests will fail + unset ::errorInfo +} -result {errorInfo {} write} + # append no longer triggers read traces when fetching the old values of |