Developer Guide and Reference

Contents

How the Compiler Defines Bounds Information for Pointers

The pointer checker is not supported on
macOS*
systems.
The following defines how the compiler determines the bound information for pointers.
In each section,
lower_bound(
p
)
refers to the lower bound associated with
p
and
upper_bound(
p
)
refers to the upper bound associated with
p
.
Pointers created by the alloca() function
p = alloca(size); // lower_bound (p) is (char *)p // upper_bound (p) is lower_bound(p) + size - 1
Pointers created by the calloc() function
p = calloc(num, size); // lower_bound(p) is (char *)p // upper_bound(p) is lower_bound(p) + size * num - 1
Pointers created by the
malloc()
function
p =