[issue11393] Integrate faulthandler module into Python 3.3
report at bugs.python.org
Tue Mar 22 10:25:02 CET 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Le mardi 22 mars 2011 à 09:01 +0000, Marc-Andre Lemburg a écrit :
> Perhaps you could consider adding a similar approach (raising
> an exception instead of writing a traceback) to the module.
> We could then port our code to use your module, which is
> more advanced.
I already wrote a patch implementing this idea, 2 years ago, and the
idea was rejected. Re-read the history of the module, described in the
first message of this issue:
<< History of this module.
I first proposed a segfault handler using setjmp/longjmp to raise a
classic Python exception. So it was possible to execute Python code
after a segfault (including stack overflow). But the idea was rejected
because the Python internal state may be corrupted if the segfault was
an invalid memory write (buffer overflow?), and anyway we cannot
warranty that the internal state is still consistent after a long jump.
=> http://bugs.python.org/issue3999 (sept. 2009)
You may dig python-dev archives to learn more about this proposition.
> BTW: Why do you call the traceback functions "*backtrace*" instead
> of "*traceback*" ?
Oh... I don't know. Since Python uses "traceback" word, I will rename my
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list