Occurs when a read or write instruction references a block (2-bytes or more) of memory where part of the block is logically invalid.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Example
struct tally { int num; char count; }; struct tally *pCurrent = (struct tally *)malloc(5); // incorrect size allocated struct tally *pRoot = (struct tally *)malloc(sizeof(struct tally)); pCurrent->num = 1; pCurrent->count = 1; *pRoot = *pCurrent; // will result in partial invalid read
Note
Different compilers and optimization levels can produce different assembly for block copies of memory. Depending on the generated assembly, this example might produce an invalid memory access problem.
Parent topic: Problem Type Reference