• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: sigbus vs sigsegv on mprotect() exeception?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: sigbus vs sigsegv on mprotect() exeception?
      • From: Dave Zarzycki <email@hidden>
References: 
 >sigbus vs sigsegv on mprotect() exeception? (From: Brad Parker <email@hidden>)
 >Re: sigbus vs sigsegv on mprotect() exeception? (From: Terry Lambert <email@hidden>)

  • Prev by Date: Re: sigbus vs sigsegv on mprotect() exeception?
  • Next by Date: Re: sigbus vs sigsegv on mprotect() exeception?
  • Previous by thread: Re: sigbus vs sigsegv on mprotect() exeception?
  • Next by thread: Re: sigbus vs sigsegv on mprotect() exeception?
  • Index(es):
    • Date
    • Thread