Compute the AddressSanitizer layout of a stack frame.
Declared in <llvm/Transforms/Utils/ASanStackFrameLayout.h>
ASanStackFrameLayout
ComputeASanStackFrameLayout(
SmallVectorImpl<ASanStackVariableDescription>& Vars,
uint64_t Granularity,
uint64_t MinHeaderSize);
Reorders Vars by alignment and writes each variable's Offset. The resulting FrameSize is a multiple of MinHeaderSize.
Layout with granularity, frame alignment, and frame size.
| Name | Description |
|---|---|
| Vars | Stack variables to place; may be reordered and updated. |
| Granularity | AddressSanitizer shadow granularity (usually 8; also 16, 32, or 64). |
| MinHeaderSize | Minimal size of the left-most redzone (header). Must be a power of two, at least four pointer sizes, and >= Granularity. |