summaryrefslogtreecommitdiffstats
path: root/generic/tclTrace.c
diff options
context:
space:
mode:
authormig <mig>2012-02-06 16:43:46 (GMT)
committermig <mig>2012-02-06 16:43:46 (GMT)
commitce0bed6e24611fae430cf6eb73c9e7dd9bc27646 (patch)
tree13aebbdee5531d588f3da83aea837ff321dba2af /generic/tclTrace.c
parent38a6237471b9e9b41e78f87edc89e7bd410f1ce2 (diff)
downloadtcl-ce0bed6e24611fae430cf6eb73c9e7dd9bc27646.zip
tcl-ce0bed6e24611fae430cf6eb73c9e7dd9bc27646.tar.gz
tcl-ce0bed6e24611fae430cf6eb73c9e7dd9bc27646.tar.bz2
Fix for [Bug 3484621]: insure that execution traces on bytecoded commands
bump the interp's compile epoch.
Diffstat (limited to 'generic/tclTrace.c')
-rw-r--r--generic/tclTrace.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 28e6934..ad81c58 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -1124,6 +1124,16 @@ Tcl_TraceCommand(
if (tracePtr->flags & TCL_TRACE_ANY_EXEC) {
cmdPtr->flags |= CMD_HAS_EXEC_TRACES;
}
+
+ /*
+ * Bug 3484621: up the interp's epoch if this is a BC'ed command
+ */
+
+ if (cmdPtr->compileProc != NULL) {
+ Interp *iPtr = (Interp *) interp;
+ iPtr->compileEpoch++;
+ }
+
return TCL_OK;
}
@@ -1226,6 +1236,15 @@ Tcl_UntraceCommand(
*/
cmdPtr->flags &= ~CMD_HAS_EXEC_TRACES;
+
+ /*
+ * Bug 3484621: up the interp's epoch if this is a BC'ed command
+ */
+
+ if (cmdPtr->compileProc != NULL) {
+ Interp *iPtr = (Interp *) interp;
+ iPtr->compileEpoch++;
+ }
}
}