lkml.org 
[lkml]   [1998]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bus Errors!
On Sat, 7 Feb 1998, Gabriel Paubert wrote:

> On Sat, 7 Feb 1998, Suman_Saraf wrote:
>
> > Sorry for the earlier goof up with the cd thing :-) What I was trying out
> > is :-
> >
> > This is a snip from man 7 signal
> > ----------------
> > A SIGBUS is missing; this is because the 386 hardware does
> > not generate such a signal, but makes porting from other
> > architectures unnecessarily difficult.
> > ----------------
>
> I don't have this on my man page.

Neither do I (man pages from RH5.0).

> > Then how come netscape dumps core with a bus error on my 386 running Linux
> > (when I try to access a Java Enables page)??

Because it wants to?
Because a SIGBUS doesn't involve a core dump?

I tried stracing netscape, then doing a "killall -SEGV
netscape-navigator".
Here is the relevant part of the trace:

sigaction(SIGSEGV, {0x83c52d0, [ALRM], 0x1a58}, NULL) = 0
[much later...]

--- SIGSEGV (Segmentation fault) ---
getpid() = 23163
kill(23163, SIGBUS) = 0
--- SIGBUS (Bus error) ---
+++ killed by SIGBUS +++

So basically it seems to set up a signal handler for SIGSEGV that just
does a "kill(getpid(), SIGBUS)".

My only guess is that since SIGBUS doesn't trigger a core dump and SIGSEGV
does, they avoid littering peoples' filesystems with gigantic corefiles
(NS *is* big...).

We'll know for sure when the source comes out.

> Are you using 2.0.x or 2.1.x ? I'll assume 2.0.x.
>
> > I have upgraded my libc with gnumalloc() patch and now it is ok but what I
> > want to point out is how is a bus error generated in the 1st case on a 386
> > machine when the man page says otherwise.
> >
> > And one more question: Do the later x86's generate this signal ?
>
> You should be able to generate SIGBUS at will under 2.0.x.

With kill(), you can generate whatever signal you want :)

[ info on SIGBUS deleted ]

> > Any pointers would be greatly appreciated.
> >
> > Also I would like to know , has anyone ever come across a program on Linux
> > which dumps core with a SIG_BUS other than netscape ??
> >

Not many. But Netscape on Solaris can exit with SIGBUS too.

[rest deleted]

Did I miss something? SIGBUS has never triggered a core dump for me;
only SIGSEGV has.

Brad

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site