[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4 (faulthandler)

victor.stinner python-checkins at python.org
Wed Feb 11 14:26:06 CET 2015


https://hg.python.org/cpython/rev/f50974be635d
changeset:   94584:f50974be635d
parent:      94582:7d826a6b92a1
parent:      94583:689092296ad3
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Feb 11 14:23:46 2015 +0100
summary:
  Merge 3.4 (faulthandler)

files:
  Modules/faulthandler.c |  9 +++++----
  1 files changed, 5 insertions(+), 4 deletions(-)


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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list