Re: sigbus vs sigsegv on mprotect() exeception?
Re: sigbus vs sigsegv on mprotect() exeception?
- Subject: Re: sigbus vs sigsegv on mprotect() exeception?
- From: Brad Parker <email@hidden>
- Date: Mon, 27 Oct 2008 11:46:15 -0400
- Comments: In-reply-to Terry Lambert <email@hidden> message dated "Mon, 27 Oct 2008 06:14:13 -0700."
- Organization: Heeltoe Consulting
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