images\error_sml.gifABWL: Late Detect Array Bounds Write (Error Detection)

Example       Related Topics

An ABWL message indicates that the program wrote a value before the beginning or after the end of an allocated block of memory. Because Purify instrumented one or more components with minimal instrumentation, it cannot determine the exact location of the error. Instead, Purify performs a late detect scan after every 200 heap operations or if 10 seconds has elapsed between the currently active heap operation and the last heap operation, whichever comes first.

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:

§      Enable late detect scanning in the settings dialog boxes.

§      To help Purify find the exact error location, do any one of the following:

§          Rerun the program using precise instrumentation.

§          In the Advanced tab in the settings dialog boxes, lower the values for Late detect scan counter and Late detect scan interval. Note however that higher values allow your program to run faster.

§          Call one of the Purify API functions: PurifySetLateDetectScanCounter, PurifySetLateDetectScanInterval or PurifyHeapValidate.

§      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.

§      This error does not apply to local arrays allocated on the stack.

(C) Copyright IBM Corporation 1992, 2010.