Memory Validator can detect potentially uninitialized data by looking for memory allocations that have the Microsoft® uninitialized data signature in them.
The debug C runtime heap initialises all allocated memory with a signature byte of 0xCD.
Bit patterns in memory are sought out that match the default values:
•0xCD for BYTEs
•0xCDCD for WORDSs
•0xCDCDCDCD for 32 bit pointers (and DWORDs)
•0xCDCDCDCDCDCDCDCD for 64 bit pointers (and QWORDs)
Any objects found with the signature are displayed in the Memory tab which is updated to display the allocations with uninitialised memory.
Uninitialized data detection is only available when your program is compiled in _DEBUG mode.
See the global settings for checking uninitialised data.
It may not be that uncommon to find a byte that has actually been deliberately initialised to 0xCD by the program - a 1 in 256 chance for random data for example.
It's less likely to find words similarly initialised to 0xCDCD, very unlikely to find such DWORDS (1 in 4 billion for random data), and exceptionally unlikely to find such QWORDS (1 in 16 quintillion for random data).
Because of this, you should use your own judgement as to whether reported allocations are false positives, based on what you know about the behaviour of your program.
Use one of the following methods during a session to start uninitialized memory detection:
or click the Check Initialised icon on the session toolbar.