Re: Possible reasons for SIGBUS error?
- From: Rainer Weikusat <rweikusat@xxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 12:28:42 +0200
MWimmer <michael.wimmer1@xxxxxx> writes:
[...]
Since then, each of us has independently experienced crashes with
signal SIGBUS. These crashes were not reproducible: Running the same
program again did not result in an error. The machines used were
Pentium 4's and Xeons (We have yet to make a statistic, if the error
only happens on certain machines)
I've been searching on the internet for possible causes of SIGBUS. It
seems, that there are two possible occasions:
1. misaligned memory pointer. However, according to what I read on the
internet, the Pentium should also be able to cope with misaligned
memory.
2. Something wrong with respect to mmap(). I'm not an expert in this,
so maybe someone could expolain me that connection a bit more.
However, none of our programs is using mmap() directly.
The only occurences of SIGBUS on x86-Linux I had so far where caused
by bad memory. You definitely shouldn't get alignment traps and
without some amount of criminal energy[1], compiled code shouldn't do
misaligned accesses, anyway.
[1] example:
char a[8];
unsigned *p;
p = (unsigned *)(a + 1);
*p = 0
That would likely trap an architecture that can't do misaligned
accesses.
.
- Follow-Ups:
- Re: Possible reasons for SIGBUS error?
- From: MWimmer
- Re: Possible reasons for SIGBUS error?
- References:
- Possible reasons for SIGBUS error?
- From: MWimmer
- Possible reasons for SIGBUS error?
- Prev by Date: Re: Problem with linking C shared library into C++ shared library
- Next by Date: Re: Problem with linking C shared library into C++ shared library
- Previous by thread: Possible reasons for SIGBUS error?
- Next by thread: Re: Possible reasons for SIGBUS error?
- Index(es):
Relevant Pages
|
|