summaryrefslogtreecommitdiffstats
path: root/Python/codegen.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2025-03-07 15:34:53 (GMT)
committerGitHub <noreply@github.com>2025-03-07 15:34:53 (GMT)
commit12db45211d411583cbe272c7ba6811a811b721ca (patch)
tree9533799ca044e94354da6ff226120711ab81ca49 /Python/codegen.c
parentc476410dc5ae62ffb5e32f64f9a3a622485c7d93 (diff)
downloadcpython-12db45211d411583cbe272c7ba6811a811b721ca.zip
cpython-12db45211d411583cbe272c7ba6811a811b721ca.tar.gz
cpython-12db45211d411583cbe272c7ba6811a811b721ca.tar.bz2
gh-130851: Only intern constants of types generated by the compiler (#130901)
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.
Diffstat (limited to 'Python/codegen.c')
0 files changed, 0 insertions, 0 deletions