Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 01 September 2012 - 09:44 AM

What kind of allocation is being indexed? Is it created with malloc or new? Is it a member of a class with members on either side? Is it a container class that you've got the code for? Is it a standard container like a std::vector?

For structures that you allocate with malloc/new, most games I've worked on have had a #define that you can enable, which pads every new/malloc call with a begin/end buffer, so that you can watch the buffer areas for corruption. I guess your project doesn't have an allocator with debugging features like this?


There's some good tips in this blog post, including the above mentioned Page Heap mode:
http://randomascii.w...h-more-crashes/

Page Heap puts each allocation on its own 4-KB page, with the allocated memory aligned to the end of the page. Therefore if you overrun the buffer you will touch the next page. Page Heap ensures that the next page will be unmapped memory so you get a guaranteed access violation at the exact moment that you overrun the buffer.


#1Hodgman

Posted 01 September 2012 - 09:42 AM

What kind of allocation is being indexed? Is it created with malloc or new? Is it a class within your own code-base? Is it a standard container like a std::vector?

For structures that you allocate with malloc/new, most games I've worked on have had a #define that you can enable, which pads every new/malloc call with a begin/end buffer, so that you can watch the buffer areas for corruption. I guess your project doesn't have an allocator with debugging features like this?


There's some good tips in this blog post, including the above mentioned Page Heap mode:
http://randomascii.wordpress.com/2011/12/07/increased-reliability-through-more-crashes/

Page Heap puts each allocation on its own 4-KB page, with the allocated memory aligned to the end of the page. Therefore if you overrun the buffer you will touch the next page. Page Heap ensures that the next page will be unmapped memory so you get a guaranteed access violation at the exact moment that you overrun the buffer.


PARTNERS