Re: gmalloc prevents a "Bus error"
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