• 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: gmalloc prevents a "Bus error"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gmalloc prevents a "Bus error"


  • Subject: Re: gmalloc prevents a "Bus error"
  • From: Eric Albert <email@hidden>
  • Date: Mon, 3 Oct 2005 23:51:29 -0400

On Oct 3, 2005, at 11:40 PM, David DeHaven wrote:

"Enable Guard Malloc" is not aggressive memory checking, it's simply adding guard pages to allocations *over* 4096 bytes.

As Dmitry's post noted, that's not quite right. Guard Malloc will catch buffer overflows because it puts allocations at the end of a page, followed by a guard page. However, that obviously prevents you from catching "overflows" in the other direction -- walking off the beginning of a buffer rather than the end. Logically, that kind of error would be more likely to crash in normal usage and work under Guard Malloc than most other kinds of errors.


However, you can invert the behavior of Guard Malloc via the MALLOC_PROTECT_BEFORE environment variable. When you set that, Guard Malloc places all allocations at the start of the page with a guard page before the allocation's page. I'd try suggest the original poster try that version and see if that causes the app to crash.

Hope this helps,
Eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >gmalloc prevents a "Bus error" (From: Craig Maloney <email@hidden>)
 >Re: gmalloc prevents a "Bus error" (From: "Justin C. Walker" <email@hidden>)
 >Re: gmalloc prevents a "Bus error" (From: "Corey O'Connor" <email@hidden>)
 >Re: gmalloc prevents a "Bus error" (From: David DeHaven <email@hidden>)

  • Prev by Date: Re: gmalloc prevents a "Bus error"
  • Next by Date: Re: gmalloc prevents a "Bus error"
  • Previous by thread: Re: gmalloc prevents a "Bus error"
  • Next by thread: Re: gmalloc prevents a "Bus error"
  • Index(es):
    • Date
    • Thread