Heap Damage Search

This is an extension of my previous question Crash app without explanation .

I have many crashes that are supposedly caused by heap corruption on the application server. These accidents occur only in production; they cannot be played in a test environment.

I am looking for a way to track these failures.

Verifier was proposed, and everything would be nice, but it is unsuitable on our production server. When we try to launch it in production using the application verifier, it becomes so slow that it is completely unusable, although it is a rather powerful server (64-bit application, 16 GB of memory, 8 processors). Running it without an application verifier, it uses only 1 GB of memory and not more than 10-15% of all processor cycles.

Are there any other tools that can help find heap damage without adding a lot of overhead?

+2
source share
3 answers

Use the debug version of Microsoft runtime libraries. Turn on red zoning and get your heap automatically checked every 128 (say) heap operations, calling _CrtSetDbgFlag()once during initialization.

_CRTDBG_DELAY_FREE_MEM_DF can be very useful for finding errors used after use, but the size of your heap grows monitonically when used.

+3
source

- , , , , ? . , .

+1

Mudflap GCC. .
-fmudflap. (//). ( x1.5 x5). .

-1

All Articles