angr.go.optimization_passes.stdlib_folder

class angr.go.optimization_passes.stdlib_folder.GoStdlibFolder

Bases: OptimizationPass, CFGTransformationMixin

Fold inlined standard-library bodies back into the calls they came from.

container/list: new(List) plus the Init stores is list.New(); lazyInit (if l.root.next == nil { l.Init() }) followed by new(Element) and the insert stores is l.PushBack(v)/l.PushFront(v); l.len == 0 ? nil : l.root.next is l.Front() (root.prev: Back()). A fold needs the whole body.

ARCHES = None
PLATFORMS = None
STAGE: OptimizationPassStage = 7
NAME = 'Fold inlined Go standard-library functions'
__init__(func, manager, **kwargs)
rewrite_ite(expr)

l.len == 0 ? nil : l.root.next -> l.Front() (root.prev: l.Back()).

Return type:

Expression | None

Parameters:

expr (ITE)