summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authormig <mig>2012-02-06 16:46:17 (GMT)
committermig <mig>2012-02-06 16:46:17 (GMT)
commit234e0816da7ffb6d8d3691f6fac55f330285ef10 (patch)
tree61bb17debaf1681940374fbcaff97b26005846c3 /generic
parent1b8b1325832f5d25e6db0c5b7839dada981562f5 (diff)
parent3726e1f19cfa86bd6348c60bc1b600512748db4f (diff)
downloadtcl-234e0816da7ffb6d8d3691f6fac55f330285ef10.zip
tcl-234e0816da7ffb6d8d3691f6fac55f330285ef10.tar.gz
tcl-234e0816da7ffb6d8d3691f6fac55f330285ef10.tar.bz2
Fix for [Bug 3484621]: insure that execution traces on bytecoded commands bump the interp's compile epoch.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclTrace.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 13359ee..c1cae76 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -1126,6 +1126,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;
}
@@ -1228,6 +1238,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++;
+ }
}
}