Late Detect Array Bounds Write (ABWL)

Memory Profiling for C and C++

An ABWL message indicates that the program wrote a value before the beginning or after the end of an allocated block of memory.

Memory Profiling checks for ABWL errors whenever free() or dump() routines are called, or whenever the free queue is actually flushed.

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.

Memory Profiling actually allocates a larger block by adding a Red Zone at the beginning and end of each allocated block of memory in the program. Memory Profiling monitors these Red Zones to detect ABWL errors.

Increasing the size of the Red Zone helps HCL OneTest Embedded catch bounds errors before or beyond the block at the expense of increased memory usage. You can change the Red Zone size in the Memory Profiling Settings.

The ABWL error does not apply to local arrays allocated on the stack.

Note Unlike PurifyPlus, the ABWL error in the HCL OneTest Embedded Memory Profiling tool only applies to heap memory zones and not to global or local tables.

Related Topics

Error Messages | Memory Profiling Results | Memory Profiling Settings