Skip to main content

VALIDATE_STACK_RED_ZONE

Constant VALIDATE_STACK_RED_ZONE 

Source
const VALIDATE_STACK_RED_ZONE: usize = _; // 262_144usize
Expand description

Stack one NativeNode::validate level needs below it before the check grows its stack.

The check recurses once per tree level, and a debug build’s frame for one level is large: measured on an 80-term chain, the whole check needed about 1.9 MiB, which overflows the 2 MiB stack a test thread has. There is no depth limit on the trees this route compiles, so the check grows its stack on demand rather than relying on the caller’s.