Skip to content
Prev Previous commit
Next Next commit
Remove all remaining uses of NOTRACE_DISPATCH() as they might be unsafe.
  • Loading branch information
markshannon committed Sep 7, 2022
commit 5cfaab684ed65696787563a2f128af0a2dd8bd58
12 changes: 3 additions & 9 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
#define PRE_DISPATCH_GOTO() ((void)0)
#endif

#define NOTRACE_DISPATCH() \
{ \
NEXTOPARG(); \
PRE_DISPATCH_GOTO(); \
DISPATCH_GOTO(); \
}
Comment thread
gvanrossum marked this conversation as resolved.

/* Do interpreter dispatch accounting for tracing and instrumentation */
#define DISPATCH() \
Expand Down Expand Up @@ -1213,7 +1207,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
assert(value != NULL);
Py_INCREF(value);
PUSH(value);
NOTRACE_DISPATCH();
DISPATCH();
}

TARGET(LOAD_FAST__LOAD_CONST) {
Expand All @@ -1226,7 +1220,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
value = GETITEM(consts, oparg);
Py_INCREF(value);
PUSH(value);
NOTRACE_DISPATCH();
DISPATCH();
}

TARGET(STORE_FAST__LOAD_FAST) {
Expand Down Expand Up @@ -1261,7 +1255,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
assert(value != NULL);
Py_INCREF(value);
PUSH(value);
NOTRACE_DISPATCH();
DISPATCH();
}

TARGET(POP_TOP) {
Expand Down