Why does Memory Advisor in OMT mode sometimes seem to miss errors reading uninitialized memory?
By default, Memory Advisor in OMT mode does not report an error when your program copies uninitialized memory from one location to another. This is because C and C++ structures can contain unused padding bytes–space added to the structure to keep the structure’s elements properly aligned for access. When your program copies a structure from one location to another by assignment, it copies all the bytes, including the padding bytes. Therefore, even if your program initializes all members of a structure, Memory Advisor may detect an uninitialized memory access when your program copies the padding bytes. Since this is not a real error, the default behavior of Memory Advisor is to not report an access to uninitialized memory when your program is copying uninitialized memory. Instead, it reports an error if your program reads uninitialized memory without writing it back out.