Segmentation Fault

John Machin sjmachin at lexicon.net
Mon Aug 28 03:14:20 EDT 2006


pycraze wrote:
> I would like to ask a question. How do one handle the exception due to
> Segmentation fault due to Python ?

This is confusing. A seg fault kills the process immediately. No
exception (in the Python sense of that word) is raised.

> Our bit operations and arithmetic
> manipulations are written in C

Do you have a Python extension that is written in C, or are you
embedding Python in a C program -- in other words, is a Python script
calling a C function, or is a C program calling a Python function?

> and to some of our testcases we
> experiance Segmentation fault from the python libraries.

What is it that you are calling "the python libraries"? Tell us the
filenames of these libraries. *Show us what is output on your stderr
when you experience "Segmentation fault from the python libraries".*

Was this Python/C combination recently created by current personnel, or
do we have a case of vanished author(s)?

>
> If i know how to handle the exception for Segmentation fault , it will
> help me complete the run on any testcase , even if i experiance Seg
> Fault due to any one or many functions in my testcase.

It would also help if you told us what platform (hardware and software)
that you are running on, what version of Python, and what versions of
any 3rd-party Python modules/packages that may be involved.

Cheers,
John




More information about the Python-list mailing list