You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python 3.13t crashes when constructing code objects with non-standard constants #130851
PyTorch Dynamo constructs code objects with non-standard constants. This is unusual, but seems to work with the default (non-free threaded build) of CPython.
However, it crashes in the free threaded build due to a few assertions when we try to de-dupe (intern) and immortalize constants:
// This should never happen: all the constants we support have
// infallible hash functions.
Py_FatalError("code: hash failed");
We should more gracefully handle unexpected code object constants in the free threading build. I think the interning code should behave like _PyCode_ConstantKey() where unhandled objects types are treated as unequal if they are not the same instance (i.e., identity comparison for unexpected types).
Activity
pythongh-130851: Don't crash when deduping unusual code constants.
pythongh-130851: Don't crash when deduping unusual code constants.
gh-130851: Don't crash when deduping unusual code constants (#130853)
pythongh-130851: Don't crash when deduping unusual code constants (py…
[3.13] gh-130851: Don't crash when deduping unusual code constants (G…
pythongh-130851: Skip test_unusual_constants under refleak checker
pythongh-130851: Only intern constants of types generated by compiler
gh-130851: Only intern constants of types generated by the compiler (#…
[3.13] pythongh-130851: Only intern constants of types generated by t…
[3.13] gh-130851: Only intern constants of types generated by the com…