gh-111968: Explicit handling for finalized freelist (gh-113929)

This commit is contained in:
Donghee Na 2024-01-12 09:31:28 +09:00 committed by GitHub
parent 53d2e1f26c
commit efa738e862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 19 deletions

View file

@ -132,10 +132,6 @@ PyFloat_FromDouble(double fval)
struct _Py_float_state *state = get_float_state();
op = state->free_list;
if (op != NULL) {
#ifdef Py_DEBUG
// PyFloat_FromDouble() must not be called after _PyFloat_Fini()
assert(state->numfree != -1);
#endif
state->free_list = (PyFloatObject *) Py_TYPE(op);
state->numfree--;
OBJECT_STAT_INC(from_freelist);