summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2023-07-31 21:16:57 (GMT)
committerGitHub <noreply@github.com>2023-07-31 21:16:57 (GMT)
commit5e584eb704d656c9a6a648dadda63237706287db (patch)
tree69c69c56679ead33e7f59df04af28fc88e6509f1 /Python
parentde51dede5b48ef23d7d33d92f3616824e23fd205 (diff)
downloadcpython-5e584eb704d656c9a6a648dadda63237706287db.zip
cpython-5e584eb704d656c9a6a648dadda63237706287db.tar.gz
cpython-5e584eb704d656c9a6a648dadda63237706287db.tar.bz2
GH-104584: Fix incorrect uoperands (GH-107513)
Diffstat (limited to 'Python')
-rw-r--r--Python/optimizer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/optimizer.c b/Python/optimizer.c
index 09120c3..238ab02 100644
--- a/Python/optimizer.c
+++ b/Python/optimizer.c
@@ -579,7 +579,8 @@ pop_jump_if_bool:
for (int i = 0; i < nuops; i++) {
oparg = orig_oparg;
uint64_t operand = 0;
- int offset = expansion->uops[i].offset;
+ // Add one to account for the actual opcode/oparg pair:
+ int offset = expansion->uops[i].offset + 1;
switch (expansion->uops[i].size) {
case OPARG_FULL:
if (extras && OPCODE_HAS_JUMP(opcode)) {