angr.go.optimization_passes.errors_folder

Fold the inlined parts of fmt.Errorf and errors.New back into calls.

Since CL 708836 (go1.27) fmt.Errorf(format, a...) is split so it inlines into its callers:

if err = errorf(format, a...); err != nil { return err }
return errors.New(format)      // &errorString{format}

The caller keeps the errorf call, a nil check of its itab word and a fallback arm that allocates an errors.errorString holding the format. The fallback is dropped and the call becomes fmt.Errorf. A remaining new(errors.errorString) whose string field is stored right away is an inlined errors.New(s).

class angr.go.optimization_passes.errors_folder.ErrorsFolder

Bases: object

Run by GoBuiltinRewriter before its call rewriting (allocations are still runtime calls).

__init__(pass_)
Parameters:

pass_ (GoBuiltinRewriter)

run()
Return type:

bool