mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
refactor __del__ exception handler into PyErr_WriteUnraisable
add sanity check to gc: if an exception occurs during GC, call PyErr_WriteUnraisable and then call Py_FatalEror.
This commit is contained in:
parent
b9ce5ada37
commit
b709df3810
5 changed files with 50 additions and 21 deletions
|
@ -92,6 +92,7 @@ extern DL_IMPORT(void) _PyErr_BadInternalCall(char *filename, int lineno);
|
|||
/* Function to create a new exception */
|
||||
DL_IMPORT(PyObject *) PyErr_NewException(char *name, PyObject *base,
|
||||
PyObject *dict);
|
||||
extern DL_IMPORT(void) PyErr_WriteUnraisable(PyObject *);
|
||||
|
||||
/* In sigcheck.c or signalmodule.c */
|
||||
extern DL_IMPORT(int) PyErr_CheckSignals(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue