]> granicus.if.org Git - python/commitdiff
(Merge 3.4) faulthandler: test_gil_released() now uses _sigsegv() instead of
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 30 Sep 2014 11:55:30 +0000 (13:55 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 30 Sep 2014 11:55:30 +0000 (13:55 +0200)
_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.

1  2 
Lib/test/test_faulthandler.py
Modules/faulthandler.c

Simple merge
index ee007192625d90cd4b1abc26303298f8e6c7f474,c17ffd8aca5b26cd7c4963ce0914fe50c5b5adb4..568724b6f1710c2d565015bd706521569c7c98fd
@@@ -843,26 -809,16 +843,18 @@@ faulthandler_read_null(PyObject *self, 
  {
      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