summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2024-07-29 21:49:17 (GMT)
committerGitHub <noreply@github.com>2024-07-29 21:49:17 (GMT)
commit7797182b78baf78f64fe16f436aa2279cf6afc23 (patch)
tree75ecc6706e7e6eff5513d78cc0499f769ebdb6e2 /Objects
parent78df1043dbdce5c989600616f9f87b4ee72944e5 (diff)
downloadcpython-7797182b78baf78f64fe16f436aa2279cf6afc23.zip
cpython-7797182b78baf78f64fe16f436aa2279cf6afc23.tar.gz
cpython-7797182b78baf78f64fe16f436aa2279cf6afc23.tar.bz2
GH-118093: Improve handling of short and mid-loop traces (GH-122252)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/genobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index c204ac0..b281af8 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -342,8 +342,9 @@ _PyGen_yf(PyGenObject *gen)
{
if (gen->gi_frame_state == FRAME_SUSPENDED_YIELD_FROM) {
_PyInterpreterFrame *frame = &gen->gi_iframe;
- assert(is_resume(frame->instr_ptr));
- assert((frame->instr_ptr->op.arg & RESUME_OPARG_LOCATION_MASK) >= RESUME_AFTER_YIELD_FROM);
+ // GH-122390: These asserts are wrong in the presence of ENTER_EXECUTOR!
+ // assert(is_resume(frame->instr_ptr));
+ // assert((frame->instr_ptr->op.arg & RESUME_OPARG_LOCATION_MASK) >= RESUME_AFTER_YIELD_FROM);
return PyStackRef_AsPyObjectNew(_PyFrame_StackPeek(frame));
}
return NULL;