Re: sigbus vs sigsegv on mprotect() exeception?
Re: sigbus vs sigsegv on mprotect() exeception?
- Subject: Re: sigbus vs sigsegv on mprotect() exeception?
- From: Dave Zarzycki <email@hidden>
- Date: Mon, 27 Oct 2008 09:28:28 -0700
Brad,
This is arguably a bug, but probably not worth fixing at this point.
In practice, the difference between these two signals is mostly, if
not totally historic. Please consider changing the code to catch both
signals and handle them identically.
davez
On Oct 27, 2008, at 8:46 AM, Brad Parker wrote:
Terry Lambert wrote:
Dereference of null pointers causes SIGBUS because we map an
inaccessible page at page zero to prevent an accessible page being
mapped there instead. For 64 bit programs, we do the same for the low
4G to catch pointer truncations from things like pointer-int-pointer
pig tricks. If you don't like it you can always mmap and munmap a
page on top of it to get an SIGSEGV instead.
I believe I am mmaping pages and still seeing SIGBUS.
specifically, I if mprotect with r+x and then try to write, I get
SIGBUS when I expect SIGSEGV.
-brad
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden