Commit bd714011 authored by Victor Stinner's avatar Victor Stinner

Issue #13874: read_null() of faulthandler uses volatile to avoid optimisation

Clang 3.0 removes "y = *x;" instruction if the optimisation level is 3.
parent 3db9c1d0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment