[Python-Dev] Fault handler updated, now disabled by default

Martin (gzlist) gzlist at googlemail.com
Thu Dec 23 23:58:23 CET 2010

On 23/12/2010, Victor Stinner <victor.stinner at haypocalc.com> wrote:
> I tested my patch on Windows (XP), Ubuntu (10.4) and FreeBSD (8) and it
> works correctly: all tests pass and the system fault handler (Windows
> popup, Apport and core dump) is also called.

Doesn't build for me without #ifdef HAVE_UNISTD_H in Python/fault.c
and you missed my comment about raise vs. kill in the other thread
which lets the SIGILL test run as well. With those changes, I get:

test_disabled (test.test_fault.FaultHandlerTests) ... ok
test_fatal_error (test.test_fault.FaultHandlerTests) ... FAIL
test_gil_released (test.test_fault.FaultHandlerTests) ... ok
test_sigbus (test.test_fault.FaultHandlerTests) ... skipped 'need
test_sigfpe (test.test_fault.FaultHandlerTests) ... skipped 'SIGFPE
cannot be caught on Windows'
test_sigill (test.test_fault.FaultHandlerTests) ... ok
test_sigsegv (test.test_fault.FaultHandlerTests) ... ok
test_xoption (test.test_fault.FaultHandlerTests) ... ok

So, this does basically work as there is a SIGSEGV compatibility hack
in VS8 and later (I'd neglected to compare the language across the
different MSDN pages). The failure is due to the test not expecting an
extra note the assert gives at the end.

See attached interdiff for suggested changes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue8863_incr.diff
Type: application/octet-stream
Size: 2346 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101223/ddd06a2d/attachment-0001.obj>

More information about the Python-Dev mailing list