summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTian Gao <gaogaotiantian@hotmail.com>2024-08-08 04:30:14 (GMT)
committerGitHub <noreply@github.com>2024-08-08 04:30:14 (GMT)
commit57d7c3e78fb635a0c6ccce38ec3e2f4284d5fac7 (patch)
tree03f9f2f24adb6313838a586240dee6374a9dd4d2 /Python
parente006c7371d8e57db26254792c67292956e88d81d (diff)
downloadcpython-57d7c3e78fb635a0c6ccce38ec3e2f4284d5fac7.zip
cpython-57d7c3e78fb635a0c6ccce38ec3e2f4284d5fac7.tar.gz
cpython-57d7c3e78fb635a0c6ccce38ec3e2f4284d5fac7.tar.bz2
gh-122247: Move instruction instrumentation sanity check after tracing check (#122251)
Diffstat (limited to 'Python')
-rw-r--r--Python/instrumentation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/instrumentation.c b/Python/instrumentation.c
index ae790a1..3481b5d 100644
--- a/Python/instrumentation.c
+++ b/Python/instrumentation.c
@@ -1344,7 +1344,6 @@ int
_Py_call_instrumentation_instruction(PyThreadState *tstate, _PyInterpreterFrame* frame, _Py_CODEUNIT *instr)
{
PyCodeObject *code = _PyFrame_GetCode(frame);
- assert(debug_check_sanity(tstate->interp, code));
int offset = (int)(instr - _PyCode_CODE(code));
_PyCoMonitoringData *instrumentation_data = code->_co_monitoring;
assert(instrumentation_data->per_instruction_opcodes);
@@ -1352,6 +1351,7 @@ _Py_call_instrumentation_instruction(PyThreadState *tstate, _PyInterpreterFrame*
if (tstate->tracing) {
return next_opcode;
}
+ assert(debug_check_sanity(tstate->interp, code));
PyInterpreterState *interp = tstate->interp;
uint8_t tools = instrumentation_data->per_instruction_tools != NULL ?
instrumentation_data->per_instruction_tools[offset] :