Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-111968: Explicit handling for finalized freelist #113929

Merged
merged 6 commits into from
Jan 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert
  • Loading branch information
corona10 committed Jan 12, 2024
commit e34e0426f94296420fe354e53ae23170c85024fa
2 changes: 1 addition & 1 deletion Objects/floatobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ PyFloat_FromDouble(double fval)
#ifdef WITH_FREELISTS
struct _Py_float_state *state = get_float_state();
op = state->free_list;
if (op != NULL) {
if (op != NULL && state->numfree > 0) {
state->free_list = (PyFloatObject *) Py_TYPE(op);
state->numfree--;
OBJECT_STAT_INC(from_freelist);
Expand Down
Loading