Subject: sigsegv on netbsd
To: help netbsd <netbsd-help@NetBSD.ORG>
From: Ron Minnich <rminnich@mini.sarnoff.com>
List: netbsd-help
Date: 11/23/1994 14:25:59
apropos my question about why protection faults are treated as SIGBUS, not
SIGSEGV, I had one comment that "well this is the brain-dead i386, so what do
you expect". 

Well, i agree on 386/486/586, but note that from i386/trap.c: 
       case T_SEGNPFLT|T_USER: 
        case T_STKFLT|T_USER: 
        case T_PROTFLT|T_USER:  /* protection fault */
        case T_ALIGNFLT|T_USER: 
                trapsignal(p, SIGBUS, type &~ T_USER);
			      ^^^^^^ (on protection fault!!!)
                break;

note that PROTFLT and SEGNPFLT are treated the same way. So this is an 
artifact of netbsd. I'm just trying to find out why it's done this way.

chuck cranor reports that netbsd/sparc is also backwards from 
sunos/sparc. HMMMM ... i think there's a netbsd problem here ...


ron
p.s. Gee, it's nice to finally be able to post OS code again. 


Ron Minnich                |"CAMDEN (AP) - The city this year plans to scale
rminnich@earth.sarnoff.com | back its volunteer-led Mischief Night campaign,
(609)-734-3120             | which is aimed at preventing pranksters from 
                           | torching the city ... "
                           | -- and you thought L.A. was a tough town ...