summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2025-03-08 18:07:39 (GMT)
committerGitHub <noreply@github.com>2025-03-08 18:07:39 (GMT)
commit14230cd96cd9275e98965def7907979c0ad9f024 (patch)
tree82804c1c84ae206fd27047b57b42333d82ec225a /Python/pythonrun.c
parent597a953484c28a07fe1c81a76db0a58985959d12 (diff)
downloadcpython-14230cd96cd9275e98965def7907979c0ad9f024.zip
cpython-14230cd96cd9275e98965def7907979c0ad9f024.tar.gz
cpython-14230cd96cd9275e98965def7907979c0ad9f024.tar.bz2
[3.13] gh-130851: Only intern constants of types generated by the compiler (GH-130901) (#130953)
The free-threading build interns and immortalizes most constants generated by the bytecode compiler. However, users can construct their own code objects with arbitrary constants. We should not intern or immortalize these objects if they are not of a type that we know how to handle. This change fixes a reference leak failure in the recently added `test_code.test_unusual_constants` test. It also addresses a potential crash that could occur when attempting to destroy an immortalized object during interpreter shutdown. (cherry picked from commit 12db45211d411583cbe272c7ba6811a811b721ca)
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions