cpython: e51d8a160a8a (original) (raw)
Mercurial > cpython
changeset 69099:e51d8a160a8a
Issue #11393: fault handler uses raise(signum) for SIGILL on Windows [#11393]
Victor Stinner victor.stinner@haypocalc.com | |
---|---|
date | Fri, 01 Apr 2011 12:08:57 +0200 |
parents | 214d0608fb84 |
children | a4fa79b0d478 |
files | Modules/faulthandler.c |
diffstat | 1 files changed, 12 insertions(+), 15 deletions(-)[+] [-] Modules/faulthandler.c 27 |
line wrap: on
line diff
--- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -270,14 +270,16 @@ faulthandler_fatal_error( else _Py_DumpTraceback(fd, tstate); -#ifndef MS_WINDOWS
- /* call the previous signal handler: it is called if we use sigaction()
thanks to SA_NODEFER flag, otherwise it is deferred */[](#l1.9)
- if (signum == SIGSEGV) {
/* don't call explictly the previous handler for SIGSEGV in this signal[](#l1.12)
handler, because the Windows signal handler would not be called */[](#l1.13)
return;[](#l1.14)
- }
- /* call the previous signal handler: it is called immediatly if we use
raise(signum); -#elsesigaction() thanks to SA_NODEFER flag, otherwise it is deferred */[](#l1.18)
- /* on Windows, don't call explictly the previous handler, because Windows
signal handler would not be called */[](#l1.22)
-#endif } /* Install handler for fatal signals (SIGSEGV, SIGFPE, ...). */ @@ -681,8 +683,9 @@ static PyObject * faulthandler_sigsegv(PyObject *self, PyObject *args) { #if defined(MS_WINDOWS)
- /* faulthandler_fatal_error() restores the previous signal handler and then
gives back the execution flow to the program. In a normal case, the[](#l1.32)
- /* For SIGSEGV, faulthandler_fatal_error() restores the previous signal
handler and then gives back the execution flow to the program (without[](#l1.34)
calling explicitly the previous error handler). In a normal case, the[](#l1.35) SIGSEGV was raised by the kernel because of a fault, and so if the[](#l1.36) program retries to execute the same instruction, the fault will be[](#l1.37) raised again.[](#l1.38)
@@ -724,13 +727,7 @@ faulthandler_sigbus(PyObject *self, PyOb static PyObject * faulthandler_sigill(PyObject *self, PyObject *args) { -#if defined(MS_WINDOWS)