Extension modules and SIGINT

Martin von Loewis loewis at informatik.hu-berlin.de
Thu Aug 16 11:17:18 EDT 2001


com-nospam at ccraig.org (Christopher A. Craig) writes:

> I have an extension module that does a _lot_ of math with
> PyLongObjects.  I'm pretty sure that I'm catching every instance where
> a failure could occur in a PyNumber call, but I still get bus errors
> when I send a keyboard interrupt.
> 
> Is this normal, or have I made a mistake?

You made a mistake, probably failing to check for a null pointer. If a
sigint occurs, functions may randomly return NULL, and you need to
check every single one.

I recommend to use a debugger to analyse where it crashes.

Regards,
Martin




More information about the Python-list mailing list