angr.go.optimization_passes.boxing_rewriter¶
- class angr.go.optimization_passes.boxing_rewriter.GoBoxingRewriter¶
Bases:
OptimizationPass,CFGTransformationMixinRecover the values behind interface conversions and type assertions.
A value converted to an interface is a (type descriptor or itab, data pointer) pair. Passed directly, the pair is already fused into an interface-typed struct literal; the literal becomes
box(x)tagged with the dynamic type. A variadic...anyargument is a stack array of such pairs referenced through a[]anyheader; its element stores are folded into one[]any{...}literal and dropped.A panicking assertion
x.(T)isif x.tab != T { panicdottype*() }followed by reads ofx.data; the sink and the branch are dropped and the data reads become the assertion.- ARCHES = None¶
- PLATFORMS = None¶
- STAGE: OptimizationPassStage = 7¶
- NAME = 'Recover boxed values behind interface conversions'¶
- __init__(func, manager, **kwargs)¶
- rewrite_struct(expr, block, stmt)¶
- Return type:
- Parameters: