Compute the AddressSanitizer layout of a stack frame.

Synopsis

Declared in <llvm/Transforms/Utils/ASanStackFrameLayout.h>

ASanStackFrameLayout
ComputeASanStackFrameLayout(
    SmallVectorImpl<ASanStackVariableDescription>& Vars,
    uint64_t Granularity,
    uint64_t MinHeaderSize);

Description

Reorders Vars by alignment and writes each variable's Offset. The resulting FrameSize is a multiple of MinHeaderSize.

Return Value

Layout with granularity, frame alignment, and frame size.

Parameters

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.

Created with MrDocs