File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Misc/NEWS.d/next/Core_and_Builtins Expand file tree Collapse file tree 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 @@ -1869,7 +1869,6 @@ finalize_interp_clear(PyThreadState *tstate)
1869
1869
_PyXI_Fini (tstate -> interp );
1870
1870
_PyExc_ClearExceptionGroupType (tstate -> interp );
1871
1871
_Py_clear_generic_types (tstate -> interp );
1872
- _PyDtoa_Fini (tstate -> interp );
1873
1872
1874
1873
/* Clear interpreter state and all thread states */
1875
1874
_PyInterpreterState_Clear (tstate );
@@ -1891,6 +1890,9 @@ finalize_interp_clear(PyThreadState *tstate)
1891
1890
1892
1891
finalize_interp_types (tstate -> interp );
1893
1892
1893
+ /* Finalize dtoa at last so that finalizers calling repr of float doesn't crash */
1894
+ _PyDtoa_Fini (tstate -> interp );
1895
+
1894
1896
/* Free any delayed free requests immediately */
1895
1897
_PyMem_FiniDelayed (tstate -> interp );
1896
1898
You can’t perform that action at this time.
0 commit comments