mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
[3.13] gh-121863: Immortalize names in code objects to avoid crash (GH-121903) (GH-121904)
(cherry picked from commit cffad5c6ef
)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
09ff4ec14f
commit
72cd53ea15
2 changed files with 25 additions and 1 deletions
|
@ -147,7 +147,7 @@ intern_strings(PyObject *tuple)
|
|||
"non-string found in code slot");
|
||||
return -1;
|
||||
}
|
||||
_PyUnicode_InternMortal(interp, &_PyTuple_ITEMS(tuple)[i]);
|
||||
_PyUnicode_InternImmortal(interp, &_PyTuple_ITEMS(tuple)[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue