summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorpenguin_wwy <940375606@qq.com>2023-02-16 11:31:41 (GMT)
committerGitHub <noreply@github.com>2023-02-16 11:31:41 (GMT)
commitdf7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d (patch)
treea63d96a288cb93b5281a6434f4b4b25b2c4ec926 /Python
parent0b13575e74ff3321364a3389eda6b4e92792afe1 (diff)
downloadcpython-df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d.zip
cpython-df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d.tar.gz
cpython-df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d.tar.bz2
gh-101928: fix crash in compiler on multi-line lambda in function call (#101933)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 0534b53..c3b344c 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -9085,8 +9085,8 @@ optimize_basic_block(PyObject *const_cache, basicblock *bb, PyObject *consts)
Py_DECREF(cnt);
break;
case RETURN_VALUE:
- INSTR_SET_OP1(inst, RETURN_CONST, oparg);
- INSTR_SET_OP0(&bb->b_instr[i + 1], NOP);
+ INSTR_SET_OP0(inst, NOP);
+ INSTR_SET_OP1(&bb->b_instr[++i], RETURN_CONST, oparg);
break;
}
break;