> >> > P.S. This also reminds me that FreeBSD is non-standard relative
> >> > to Linux and all of the major vender commercial Unices in that a disallowed
> >> > access, such as a write to a read-only region of memory, generates
> >> > a SIGBUS rather than a SIGSEGV.
> >>
> >> Yes, this even violates the 1996 POSIX spec.
> >
> > So lets make the change for 4.0. :-)
>
> Hang on, hang on. This has been discussed in the mailing list
> before. Bruce pointed out that it's useful for distinguishing between
> protection violations and unmapped pages. He requested that we
I think the POSIX way is to use an auxiliary error code in siginfo_t to
distinguish the causes of the signal. This only works for SA_SIGINFO
handlers. We do something similar using the signal code of 3-arg signal
handlers.
> first implement the SA_SIGINFO support to the point where it could
> accomplish that before changing SIGBUS to SIGSEGV. I think that makes
> sense.
SA_SIGINFO is implemented now.
More details on the POSIX signal numbers: SIGBUS is mainly for accesses
beyond the end of mmap()ed objects. It's not clear what this means in
an address space with multiple mmap()ed objects and/or non-mmap()ed
objects.
Bruce
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message