summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2022-04-05 11:49:08 (GMT)
committerGitHub <noreply@github.com>2022-04-05 11:49:08 (GMT)
commit0aa8d5cbd89cf3b61d7e8626f3a7b9c4881dfd70 (patch)
treeb28edee28c5dd4cf022135e1204421c9795b3e38 /Objects/frameobject.c
parent32091df41ce6e3a71df2cf37dc74b728c0d885f2 (diff)
downloadcpython-0aa8d5cbd89cf3b61d7e8626f3a7b9c4881dfd70.zip
cpython-0aa8d5cbd89cf3b61d7e8626f3a7b9c4881dfd70.tar.gz
cpython-0aa8d5cbd89cf3b61d7e8626f3a7b9c4881dfd70.tar.bz2
bpo-47120: make JUMP_NO_INTERRUPT relative (GH-32221)
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index c257c0a..6842e62 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -229,15 +229,6 @@ mark_stacks(PyCodeObject *code_obj, int len)
stacks[i+1] = next_stack;
break;
}
- case JUMP_NO_INTERRUPT:
- j = get_arg(code, i);
- assert(j < len);
- if (stacks[j] == UNINITIALIZED && j < i) {
- todo = 1;
- }
- assert(stacks[j] == UNINITIALIZED || stacks[j] == next_stack);
- stacks[j] = next_stack;
- break;
case POP_EXCEPT:
next_stack = pop_value(pop_value(pop_value(next_stack)));
stacks[i+1] = next_stack;
@@ -256,8 +247,13 @@ mark_stacks(PyCodeObject *code_obj, int len)
stacks[j] = next_stack;
break;
case JUMP_BACKWARD:
+ case JUMP_BACKWARD_NO_INTERRUPT:
j = i + 1 - get_arg(code, i);
assert(j >= 0);
+ assert(j < len);
+ if (stacks[j] == UNINITIALIZED && j < i) {
+ todo = 1;
+ }
assert(stacks[j] == UNINITIALIZED || stacks[j] == next_stack);
stacks[j] = next_stack;
break;