Sun Studio 12: Debugging a Program With dbx

Read From Unallocated Memory (rua) Error

Problem: Attempt to read from nonexistent, unallocated, or unmapped memory.

Possible causes: A stray pointer, overflowing the bounds of a heap block or accessing a heap block that has already been freed.


char c, *a = (char *)malloc(1);
c = a[1];    /* Read from unallocated memory (rua) */