mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-126881: fix finalization of dtoa state (#126904)
This commit is contained in:
parent
dd3a87d2a8
commit
762c603a86
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1 @@
|
|||
Fix crash in finalization of dtoa state. Patch by Kumar Aditya.
|
|
@ -1888,7 +1888,6 @@ finalize_interp_clear(PyThreadState *tstate)
|
|||
_PyXI_Fini(tstate->interp);
|
||||
_PyExc_ClearExceptionGroupType(tstate->interp);
|
||||
_Py_clear_generic_types(tstate->interp);
|
||||
_PyDtoa_Fini(tstate->interp);
|
||||
|
||||
/* Clear interpreter state and all thread states */
|
||||
_PyInterpreterState_Clear(tstate);
|
||||
|
@ -1910,6 +1909,9 @@ finalize_interp_clear(PyThreadState *tstate)
|
|||
|
||||
finalize_interp_types(tstate->interp);
|
||||
|
||||
/* Finalize dtoa at last so that finalizers calling repr of float doesn't crash */
|
||||
_PyDtoa_Fini(tstate->interp);
|
||||
|
||||
/* Free any delayed free requests immediately */
|
||||
_PyMem_FiniDelayed(tstate->interp);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue