angr.go.optimization_passes.value_fuser

class angr.go.optimization_passes.value_fuser.GoValueFuser

Bases: OptimizationPass

Re-assemble string, slice, interface and multi-result values that the ABI splits across several registers.

Call arguments and return values are grouped by the callee’s (or the function’s) Go prototype. A group that is a contiguous slice of one combo-register value becomes a load from that value, contiguous loads become one wider load, a constant (pointer, length) pair in read-only memory becomes a string literal, and anything else becomes a Struct expression.

ARCHES = None
PLATFORMS = None
STAGE: OptimizationPassStage = 7
NAME = 'Fuse Go values split across registers'
__init__(func, manager, **kwargs)
callee_prototype(call)
Return type:

GoSimTypeFunction | None

Parameters:

call (Call)

fuse_args(call, proto)
Return type:

list | None

Parameters:
fuse_results(ret_exprs, proto)
Return type:

list | None

Parameters:
fuse(ty, leaves)

Turn the leaf expressions making up one value of type ty into a single expression.

Parameters: