Re: bus error
On Sun, Aug 01, 1999 at 10:18:56AM +0200, Jonas Steverud wrote:
> erasmo perez <luiserasmo.p@berlin.de> writes:
>
> > does somebody knows what does "bus error" means and how can i get out of
> > this?
>
> >From signal(5) on Solaris:
> ---------8<----------
> Events directly caused by the execution of code by a thread,
> such as a reference to an unmapped, protected, or bad memory
> can generate SIGSEGV or SIGBUS;
> ---------8<----------
>
> How to stop it? Don't know.
>
I think these are results of programming bugs. On Solaris, the gcc
compiler switch -Wcast-align should be used (and the source then
corrected). From the manual "Using and Porting GNU CC"
-Wcast-align
Warn whenever a pointer is cast such that the required alignment of the
target is increased. For example, warn if a char * is cast to an int *
on machines where integers can only be accessed at two- or four-byte
boundaries. -
Reply to: