uncheck Command | suppress Command |
Runtime Checking | debug Command |
The check command enables checking of memory access, leaks, or usage, and prints the current status of runtime checking (RTC). The features of runtime checking that are enabled by this command are reset to their initial state by the debug command.
check -access
baf | Bad free |
duf | Duplicate free |
maf | Misaligned free |
mar | Misaligned read |
maw | Misaligned write |
oom | Out of memory |
rua | Read from unallocated memory |
rui | Read from uninitialized memory |
wro | Write to read-only memory |
wua | Write to unallocated memory |
check -leaks [-frames n] [-match m]
aib | Possible memory leak - only pointer points in the middle of the block |
air | Possible memory leak - pointer to the block exists only in register |
mel | Memory leak - no pointers to the block |
check -memuse [-frames n] [-match m]
check -all [-frames n] [-match m]
check [functions] [files] [loadobjects]
where:
You can use this to focus runtime checking on places of interest.
Note - To detect all errors, RTC does not require the program be compiled -g. However, symbolic (-g) information is sometimes needed to guarantee the correctness of certain errors (mostly read from uninitialized memory). For this reason certain errors (rui for a.out and rui + aib + air for shared libraries) are suppressed if no symbolic information is available. This behavior can be changed by using suppress and unsuppress.