angr.go.optimization_passes.stack_check_remover¶
- class angr.go.optimization_passes.stack_check_remover.GoStackCheckRemover¶
Bases:
OptimizationPass,CFGTransformationMixinRemove the goroutine stack-growth check every Go function starts with.
The check compares the stack pointer against g.stackguard0 and, when the frame does not fit, branches to a trampoline that spills the register arguments, calls runtime.morestack, reloads the arguments and jumps back to the function entry. Neither the compare, the spills nor the restart mean anything at the source level, so the trampoline is dropped and the branch leading to it becomes a plain jump; the now-dead compare is cleaned up by later stages. runtime.morestackc (//go:systemstack functions) does not return, so its trampoline ends at the call.
- ARCHES = None¶
- PLATFORMS = None¶
- STAGE: OptimizationPassStage = 1¶
- NAME = 'Remove the goroutine stack-growth check'¶
- __init__(func, manager, **kwargs)¶