On Thu, Oct 2, 2008 at 10:54 AM, Thomas Heller <[EMAIL PROTECTED]> wrote:
> Victor Stinner schrieb:
>> Hi,
>>
>> 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
Victor Stinner schrieb:
> Hi,
>
> 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.
On windows, ctypes catches fatal err
FWIW: I didn't have much luck translating segfaults into exceptions. It
(seemed) to work on
some platforms, but not others; this was in the context of C++.
In my experience, it is more useful to generate Python and C stack traces and
bail out.
I also do this for floating-point exceptions. The han