images\error_sml.gifABR: Array Bounds Read (Error Detection)

Example       Related Topics

An ABR message indicates that the program is about to read a value from before the beginning or after the end of an allocated block of memory.

This message can occur when you:

§           Make an array too small. For example, you fail to account for the terminating NULL in a string.

§           Forget to multiply by sizeof(type) when you allocate an array of objects.

§           Use an array index that is too large or is negative.

§           Fail to NULL terminate a string.

§           Are off by one when you copy elements up or down an array.

Notes:

§      Use Red zone length in the Errors and Leaks tab in the settings dialog boxes to increase the number of bytes Purify inserts at the beginning and end of each allocated block of memory in the program. Increasing this number helps Purify catch bounds errors before or beyond the block.

§      Purify detects array bounds errors within dynamically allocated regions. It does not detect these errors for global, local or static arrays.

(C) Copyright IBM Corporation 1992, 2010.