mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
GH-113486: Do not emit spurious PY_UNWIND events for optimized calls to classes. (GH-113680)
This commit is contained in:
parent
ed6ea3ea79
commit
0ae60b66de
6 changed files with 64 additions and 28 deletions
|
@ -2111,6 +2111,9 @@ do_monitor_exc(PyThreadState *tstate, _PyInterpreterFrame *frame,
|
|||
_Py_CODEUNIT *instr, int event)
|
||||
{
|
||||
assert(event < _PY_MONITORING_UNGROUPED_EVENTS);
|
||||
if (_PyFrame_GetCode(frame)->co_flags & CO_NO_MONITORING_EVENTS) {
|
||||
return 0;
|
||||
}
|
||||
PyObject *exc = PyErr_GetRaisedException();
|
||||
assert(exc != NULL);
|
||||
int err = _Py_call_instrumentation_arg(tstate, event, frame, instr, exc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue