diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-07-20 09:53:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-20 09:53:27 (GMT) |
commit | 74761548862eb5a324c23d86a6233d884f386f2e (patch) | |
tree | 2535c3312bea4a0ffe2a0215ab069a123aabcda3 | |
parent | bd390ef825c5f2ad86e0966173a6bcaca85a56f2 (diff) | |
download | cpython-74761548862eb5a324c23d86a6233d884f386f2e.zip cpython-74761548862eb5a324c23d86a6233d884f386f2e.tar.gz cpython-74761548862eb5a324c23d86a6233d884f386f2e.tar.bz2 |
GH-94851: fix immortal objects refcounting in compiler (gh-95040)
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index 30d8fdb..20eca05 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -4857,7 +4857,7 @@ compiler_joined_str(struct compiler *c, expr_ty e) Py_ssize_t value_count = asdl_seq_LEN(e->v.JoinedStr.values); if (value_count > STACK_USE_GUIDELINE) { _Py_DECLARE_STR(empty, ""); - ADDOP_LOAD_CONST_NEW(c, &_Py_STR(empty)); + ADDOP_LOAD_CONST_NEW(c, Py_NewRef(&_Py_STR(empty))); ADDOP_NAME(c, LOAD_METHOD, &_Py_ID(join), names); ADDOP_I(c, BUILD_LIST, 0); for (Py_ssize_t i = 0; i < asdl_seq_LEN(e->v.JoinedStr.values); i++) { |