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, Brad Keryan wrote:
> 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.

Aparently it is there in the libc5 man pages, but not the glibc (for obvious
reasons). In any case, it is correct -- the kernel never sends a SIGBUS
signal, but the symbol still has a value (7), and can be sent with a kill()
call.

(Well, not quite -- it will happen on a unhandled "segment not present" or
"stack segment" error, from a quick read of linux/arch/i386/kernel/traps.c
(2.1.85) -- it will kill with sigbus, and cause a kernel oops. I don't
think either of these cases will ever occour in userspace, however.

> > > 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?
>
[...]
> 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...).
And making it harder to reverse-engineer (=, annoyingly, fix). (Don't think
they need to worry about that anymore <G>!)

> > Are you using 2.0.x or 2.1.x ? I'll assume 2.0.x.
>
> With kill(), you can generate whatever signal you want :)
Under any kernel (linux or no), you can generate any signal. (On non-Linux
kernels, it might not get there due to security, but I don't know.)

> Not many. But Netscape on Solaris can exit with SIGBUS too.
Or non-intel Linux archs.

-=- James Mastros
--
"I'd feel worse if it was the first time. I'd feel better if it was
the last."
-=- "(from some Niven book, doubtless not original there)"
(qtd. by Chris Smith)

-
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    [W:1.368 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site