Sun Studio 12 Update 1: Debugging a Program With dbx

Understanding the Memory Access Error Report

Runtime checking prints the following information for memory access errors:

Error  

Information  

type

Type of error. 

access

Type of access attempted (read or write). 

size

Size of attempted access. 

address

Address of attempted access. 

size

Size of leaked block. 

detail

More detailed information about address. For example, if the address is in the vicinity of the stack, then its position relative to the current stack pointer is given. If the address is in the heap, then the address, size, and relative position of the nearest heap block is given. 

stack

Call stack at time of error (with batch mode). 

allocation

If the address is in the heap, then the allocation trace of the nearest heap block is given. 

location

Where the error occurred. If line number information is available, this information includes line number and function. If line numbers are not available, runtime checking provides function and address. 

The following example shows a typical access error.


Read from uninitialized (rui):
Attempting to read 4 bytes at address 0xefffee50
    which is 96 bytes above the current stack pointer
Variable is ”j’
Current function is rui
   12           i = j;