cpython: e6f00778d61f (original) (raw)

Mercurial > cpython

changeset 100691:e6f00778d61f

Issue #23848: Try to fix test_faulthandler on ARM Restore the previous code for stack_overflow(). [#23848]

Victor Stinner victor.stinner@gmail.com
date Wed, 23 Mar 2016 15:19:12 +0100
parents efcc48cd5bfb
children 3cc36e0f2325
files Modules/faulthandler.c
diffstat 1 files changed, 16 insertions(+), 32 deletions(-)[+] [-] Modules/faulthandler.c 48

line wrap: on

line diff

--- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -418,21 +418,21 @@ int faulthandler_enable(void) { size_t i;

-#ifdef HAVE_SIGACTION

-#endif

if (fatal_error.enabled) { return 0; } - fatal_error.enabled = 1; for (i=0; i < faulthandler_nsignals; i++) {

+#ifdef HAVE_SIGACTION

+#endif

+ handler = &faulthandler_handlers[i]; -

#ifdef HAVE_SIGACTION action.sa_handler = faulthandler_fatal_error; sigemptyset(&action.sa_mask); @@ -1062,7 +1062,6 @@ faulthandler_fatal_error_py(PyObject se Py_RETURN_NONE; } - #if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION) #define FAULTHANDLER_STACK_OVERFLOW @@ -1079,21 +1078,12 @@ stack_overflow(Py_uintptr_t min_sp, Py_u / allocate 4096 bytes on the stack at each call */ unsigned char buffer[4096]; Py_uintptr_t sp = (Py_uintptr_t)&buffer;

- *depth += 1;

-

-

-

} static PyObject * @@ -1101,19 +1091,13 @@ faulthandler_stack_overflow(PyObject *se { size_t depth, size; Py_uintptr_t sp = (Py_uintptr_t)&depth;

faulthandler_suppress_crash_report(); - depth = 0;

-

-