diff options
-rw-r--r-- | Modules/faulthandler.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index fcf4d01239..f18bbbc44f 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -943,10 +943,13 @@ faulthandler_unregister_py(PyObject *self, PyObject *args) static PyObject * faulthandler_read_null(PyObject *self, PyObject *args) { - int *x = NULL, y; + volatile int *x; + volatile int y; int release_gil = 0; if (!PyArg_ParseTuple(args, "|i:_read_null", &release_gil)) return NULL; + + x = NULL; if (release_gil) { Py_BEGIN_ALLOW_THREADS y = *x; |