Re: sigbus vs sigsegv on mprotect() exeception?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Brad Parker