Kaydet (Commit) 385efb4d authored tarafından Victor Stinner's avatar Victor Stinner

Merge 3.4 (faulthandler)

...@@ -927,12 +927,12 @@ faulthandler_fatal_error_py(PyObject *self, PyObject *args) ...@@ -927,12 +927,12 @@ faulthandler_fatal_error_py(PyObject *self, PyObject *args)
} }
#if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION) #if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION)
static void* static Py_uintptr_t
stack_overflow(void *min_sp, void *max_sp, size_t *depth) stack_overflow(Py_uintptr_t min_sp, Py_uintptr_t max_sp, size_t *depth)
{ {
/* allocate 4096 bytes on the stack at each call */ /* allocate 4096 bytes on the stack at each call */
unsigned char buffer[4096]; unsigned char buffer[4096];
void *sp = &buffer; Py_uintptr_t sp = (Py_uintptr_t)&buffer;
*depth += 1; *depth += 1;
if (sp < min_sp || max_sp < sp) if (sp < min_sp || max_sp < sp)
return sp; return sp;
...@@ -945,7 +945,8 @@ static PyObject * ...@@ -945,7 +945,8 @@ static PyObject *
faulthandler_stack_overflow(PyObject *self) faulthandler_stack_overflow(PyObject *self)
{ {
size_t depth, size; size_t depth, size;
char *sp = (char *)&depth, *stop; Py_uintptr_t sp = (Py_uintptr_t)&depth;
Py_uintptr_t stop;
faulthandler_suppress_crash_report(); faulthandler_suppress_crash_report();
depth = 0; depth = 0;
......
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