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
sum() mishandles a float subclass when accumulating into a complex total #151060
The complex-total fast path in builtin_sum_impl (Python/bltinmodule.c:3049) guards with PyFloat_Check(item) (accepts subclasses) but frees the item with _Py_DECREF_SPECIALIZED(item, _PyFloat_ExactDealloc)`, which assumes an exact float.
Activity
pythongh-151060: Fix sum() deallocating a float subclass as an exact …