MallocGuardEdges not finding buffer overrun
MallocGuardEdges not finding buffer overrun
- Subject: MallocGuardEdges not finding buffer overrun
- From: David Dunham <email@hidden>
- Date: Tue, 16 Jan 2007 17:04:04 -0800
I've never had luck using MallocGuardEdges to catch a buffer overrun.
And we had one today it didn't catch.
Our game on Windows was clearly crashing due to the heap getting
stomped, but we weren't having luck finding it there. Since almost
everything is cross-platform, I tried tracking it down on a Mac.
There was no crash, but I assumed that was because the memory that
got stomped was more benign. Still, I hoped that MallocGuardEdges
would tell me what was going on.
It didn't. I know I had it enabled correctly because the console
output includes
(3862) malloc: protecting edges
and my allocation is 9980 bytes (it's a C++ "new" but I presume this
counts), big enough to be guarded.
Is there something I'm missing?
(I eventually found where I'd asked a similar question, and Daniel
Jalkut pointed me at Guard Malloc. I enabled this in Xcode, waited a
very long time, and it crashed at the right spot. But like the docs
say, this makes your app run 100x as slow, so I'd much rather use the
relatively speedy MallocGuardEdges.)
David Dunham Macintosh Game Developer GameHouse Studios
+1 206 926 5722 http://www.gamehouse.com
"They said it couldn't be done but sometimes it doesn't
work out that way." -- Casey Stengel
_______________________________________________
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