File tree 2 files changed +4
-1
lines changed
Misc/NEWS.d/next/Core_and_Builtins
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change
1
+ Fix crash in finalization of dtoa state. Patch by Kumar Aditya.
Original file line number Diff line number Diff line change @@ -1888,7 +1888,6 @@ finalize_interp_clear(PyThreadState *tstate)
1888
1888
_PyXI_Fini (tstate -> interp );
1889
1889
_PyExc_ClearExceptionGroupType (tstate -> interp );
1890
1890
_Py_clear_generic_types (tstate -> interp );
1891
- _PyDtoa_Fini (tstate -> interp );
1892
1891
1893
1892
/* Clear interpreter state and all thread states */
1894
1893
_PyInterpreterState_Clear (tstate );
@@ -1910,6 +1909,9 @@ finalize_interp_clear(PyThreadState *tstate)
1910
1909
1911
1910
finalize_interp_types (tstate -> interp );
1912
1911
1912
+ /* Finalize dtoa at last so that finalizers calling repr of float doesn't crash */
1913
+ _PyDtoa_Fini (tstate -> interp );
1914
+
1913
1915
/* Free any delayed free requests immediately */
1914
1916
_PyMem_FiniDelayed (tstate -> interp );
1915
1917
You can’t perform that action at this time.
0 commit comments