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
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
___
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.
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
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
Changes by Adam Olsen [EMAIL PROTECTED]:
--
nosy: +Rhamphoryncus
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3999
___
___
Python-bugs-list mailing
Changes by Gabriel Genellina [EMAIL PROTECTED]:
--
nosy: +gagenellina
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3999
___
___
Python-bugs-list
Changes by Alexander Belopolsky [EMAIL PROTECTED]:
--
nosy: +belopolsky
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3999
___
___
Python-bugs-list
Changes by Skip Montanaro [EMAIL PROTECTED]:
--
nosy: +skip.montanaro
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3999
___
___
Python-bugs-list
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
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
___
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
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
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
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
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
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11659/segfault.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3999
___
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
18 matches
Mail list logo