What is a "bus error"?

Steven Majewski sdm7g at virginia.edu
Fri Feb 1 10:54:10 EST 2002


On 1 Feb 2002, Erno Kuusela wrote:

> In article
> <Pine.LNX.4.43.0202011202560.4970-100000 at zeon.well.ox.ac.uk>, Kenny
> <kccw at well.ox.ac.uk> writes:
>
> | 	I recently installed Python 2.2-5 from Fink (Unix Software for
> | MacOSX) and tried running a few sample scripts/programs.
> | 	However, some of these programs now give a "bus error" message -
> | what does this mean?
>
> it means python got a SIGBUS signal from the kernel, ie it crashed.
> SIGBUS commonly results from attempting to access unaligned memory.

... or chasing a nil pointer or useing something that's not a pointer
as a pointer.

> so it seems that there is a bug in the fink packaging of python, or
> python itself. you could try asking the fink people and/or compiling
> python yourself and seeing if that works. (if it doesn't, file a
> bug in the python bug tracker.)

You really shouldn't be getting a bus error from Python or any of
the modules packaged with it. Did you do a 'from test import testall'
in Python or 'make test' from the shell ?

Some other modules not packaged with python might have bugs that
would cause a bus-error (I know pyobjc still has at least one)
or it  might be misconfigured.

If all else fails, just get a copy of the 2.2 sources from
python.org or sourceforge and build from scratch. After unpacking
the tarfile, cd to the Python-2.2 directory and do:

./configure
make
make install
limit stack 4096
make test

-- Steve Majewski





More information about the Python-list mailing list