_read_null(), because _read_null() cannot be used on AIX. On AIX, reading from
NULL is allowed: the first page of memory is a mapped read-only on AIX.
_read_null() and _sigabrt() don't accept parameters.
{
volatile int *x;
volatile int y;
- int release_gil = 0;
- if (!PyArg_ParseTuple(args, "|i:_read_null", &release_gil))
- return NULL;
+ faulthandler_suppress_crash_report();
x = NULL;
- if (release_gil) {
- Py_BEGIN_ALLOW_THREADS
- y = *x;
- Py_END_ALLOW_THREADS
- } else
- y = *x;
+ y = *x;
return PyLong_FromLong(y);
}
- static PyObject *
- faulthandler_sigsegv(PyObject *self, PyObject *args)
+ static void
+ faulthandler_raise_sigsegv(void)
{
+ faulthandler_suppress_crash_report();
#if defined(MS_WINDOWS)
/* For SIGSEGV, faulthandler_fatal_error() restores the previous signal
handler and then gives back the execution flow to the program (without