[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-13 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19210/segfault_handler-4.patch ___ Python tracker ___ ___ Python-bugs-list

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-13 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19208/segfault_handler-3.patch ___ Python tracker ___ ___ Python-bugs-list

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-13 Thread STINNER Victor
STINNER Victor added the comment: > dmalcolm asked if it would be possible to display the > Python backtrace on Py_FatalError() It works :-) I fixed a bug in ceval.c (r85411) which was not directly related. Patch version 5: - Display the Python backtrace on Py_FatalError() (if no error occur

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-12 Thread STINNER Victor
STINNER Victor added the comment: Patch version 4: - Add segfault.c to pythoncore.vcproj - Remove #error "nope" (I used it for debug purpose) - Don't include on Windows This version works on Windows. -- Added file: http://bugs.python.org/file19210/segfault_handler-4.patch

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-12 Thread STINNER Victor
STINNER Victor added the comment: > It should be tested at least on a wide build and ... Done: it works correctly for non-BMP characters in narrow and wide builds. Eg. in wide build with U+10 character in the path: - $ ./python bla.py Fatal Python error: segmentation f

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-12 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file17717/segfault_handler-2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-12 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file17507/segfault_handler.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +dmalcolm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-12 Thread STINNER Victor
STINNER Victor added the comment: Updated example: -- $ ./python Lib/test/crashers/recursive_call.py Fatal Python error: segmentation fault Traceback (most recent call first): File "Lib/test/crashers/recursive_call.py", line 12 in File "Lib/test/

[issue8863] Segfault handler: display Python backtrace on segfault

2010-10-12 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - use more standard function names (_Py_initsegfault => _Py_InitSegfault) - use "#ifdef HAVE_SIGACTION" to support system without sigaction(): fallback to signal() - usage of the alternative stack is now optional (#ifdef HAVE_SIGALT

[issue8863] Segfault handler: display Python backtrace on segfault

2010-08-18 Thread STINNER Victor
STINNER Victor added the comment: dmalcolm asked if it would be possible to display the Python backtrace on Py_FatalError(). I don't know: Py_FatalError() is usually called when Python internals are broken. But well, segfaults do also usually occurs when something is broken :-) -- _

[issue8863] Segfault handler: display Python backtrace on segfault

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - catch also SIGFPE - add segfault.o to Makefile.pre.in - use abort() to quit instead of _exit(1) - call DebugBreak() on Windows before the abort(), as done by Py_FatalError() TODO: Patch configure to only enable segfault handler i

[issue8863] Segfault handler: display Python backtrace on segfault

2010-05-31 Thread STINNER Victor
STINNER Victor added the comment: See also issue #3999: a similar patch to raise an exception on segfault. This patch was rejected because Python internal state may be corrupted, and we cannot guarantee that next instructions will be executed correctly. This patch is safer because it just tri

[issue8863] Segfault handler: display Python backtrace on segfault

2010-05-31 Thread STINNER Victor
New submission from STINNER Victor : Attached patch implements an handler for the signal SIGSEGV. It uses its own stack to be able to allocate memory on the stack (eg. call a function), even on stack overflow. The patch requires sigaction() and sigaltstack() functions, but I didn't patched co