[issue3999] Real segmentation fault handler

2010-05-31 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: That's fine, but please provide a link to the new issue once you create it. Done: issue #8863. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3999

[issue3999] Real segmentation fault handler

2009-11-09 Thread Adam Olsen
Adam Olsen rha...@gmail.com added the comment: That's fine, but please provide a link to the new issue once you create it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3999 ___

[issue3999] Real segmentation fault handler

2009-11-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: My idea was rejected on python-dev mailing list. But I'm unable to write a patch to dump a backtrace on segfault. Anyway it would be a complelty different patch (and so a different issue). So I prefer to close this (old) issue.

[issue3999] Real segmentation fault handler

2009-01-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As mentioned in python-dev, the patch would be more suitable for inclusion if it was changed to simply print a stack trace and bail out, rather than try to resume execution of the Python program. -- nosy: +pitrou

[issue3999] Real segmentation fault handler

2008-12-10 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: fault.py: catch two segfaults in Python and C contexts. Added file: http://bugs.python.org/file12322/fault.py ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3999

[issue3999] Real segmentation fault handler

2008-12-10 Thread Adam Olsen
Changes by Adam Olsen [EMAIL PROTECTED]: -- nosy: +Rhamphoryncus ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3999 ___ ___ Python-bugs-list mailing

[issue3999] Real segmentation fault handler

2008-12-10 Thread Gabriel Genellina
Changes by Gabriel Genellina [EMAIL PROTECTED]: -- nosy: +gagenellina ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3999 ___ ___ Python-bugs-list

[issue3999] Real segmentation fault handler

2008-12-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky [EMAIL PROTECTED]: -- nosy: +belopolsky ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3999 ___ ___ Python-bugs-list

[issue3999] Real segmentation fault handler

2008-12-10 Thread Skip Montanaro
Changes by Skip Montanaro [EMAIL PROTECTED]: -- nosy: +skip.montanaro ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3999 ___ ___ Python-bugs-list

[issue3999] Real segmentation fault handler

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: New patch: - limit memory footprint: use a static buffer to store the frames, with a maximum of MAXDEPTH frames (default: MAXDEPTH=100) - if there are more than MAXDEPTH frames, jump to the frame MAXDEPTH on error (it's like a truncated

[issue3999] Real segmentation fault handler

2008-12-09 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11666/segfault-2.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3999 ___

[issue3999] Real segmentation fault handler

2008-12-09 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Oh, another change in segfault-3.patch: - disable signal handler before the first call to segfault_enter() and the last call to segfault_exit() About the memory footprint: it would be possible to use variable size buffer using malloc() and

[issue3999] Real segmentation fault handler

2008-09-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Did you consider using PyOS_CheckStack for this? Currently there is only a Windows implementation, but it seems that the primitives you use in your patch could form a Unix version. -- nosy: +amaury.forgeotdarc

[issue3999] Real segmentation fault handler

2008-09-30 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: @amaury.forgeotdarc: It looks like PyOS_CheckStack() is only implemented for Windows. It uses alloca() + __try/__except + _resetstkoflw(). The GNU libc nor Linux kernel don't check stack pointer on alloca(), it's just $esp += alloca

[issue3999] Real segmentation fault handler

2008-09-30 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Note: my patch can be adapted to catch SIGFPE (divison by zero or other math error). For int/long types, Python avoids divison by zero, but for code written in C (external modules), Python is unable to catch such errors. Eg. see last imageop

[issue3999] Real segmentation fault handler

2008-09-30 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Oops, my patch was broken. I forgot to install the fault handler! Here is a new version of the patch which also catch SIGFPE: raise an ArithmeticError. Added file: http://bugs.python.org/file11666/segfault-2.patch

[issue3999] Real segmentation fault handler

2008-09-30 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11659/segfault.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3999 ___

[issue3999] Real segmentation fault handler

2008-09-29 Thread STINNER Victor
New submission from STINNER Victor [EMAIL PROTECTED]: I would like to be able to catch SIGSEGV in my Python code! So I started to hack Python trunk to support this feature. The idea is to use a signal handler which call longjmp(), and add setjmp() at Py_EvalFrameEx() enter. See attached