From 3fd86100022103f41ada043f5bb5a7201e80ac27 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 19 May 2022 17:49:29 +0100 Subject: GH-89914: Make the oparg of the YIELD_VALUE instruction equal the stack depth. (GH-92960) --- Python/ceval.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index deb131813e..230198b41f 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2698,6 +2698,7 @@ handle_eval_breaker: } TARGET(YIELD_VALUE) { + assert(oparg == STACK_LEVEL()); assert(frame->is_entry); PyObject *retval = POP(); _PyFrame_GetGenerator(frame)->gi_frame_state = FRAME_SUSPENDED; -- cgit v1.2.1