angr.go.analyses.runtime_globals

Locate the Go runtime’s own package-level variables by shape when no data symbol names them:

  • runtime.writeBarrier: the word every compiled pointer store tests right before calling gcWriteBarrierN;

  • runtime.zerobase: the address mallocgc returns for a zero-size allocation;

  • runtime.staticuint64s: the read-only table [256]uint64{0, 1, 2, ...} small boxed integers point into;

  • runtime.firstmoduledata: the moduledata the type-descriptor reader already found.

angr.go.analyses.runtime_globals.find_runtime_globals(project)

Every runtime global recognized by shape, keyed by its Go name.

Return type:

dict[str, GoVariable]

Parameters:

project (Project)

angr.go.analyses.runtime_globals.find_staticuint64s(project)
Return type:

int | None

Parameters:

project (Project)

angr.go.analyses.runtime_globals.find_write_barrier(project)

The address tested by the conditional block in front of the write-barrier calls in the CFG.

Return type:

int | None

Parameters:

project (Project)

angr.go.analyses.runtime_globals.find_zerobase(project)

mallocgc returns &zerobase from a block that only loads the address and returns.

Return type:

int | None

Parameters:

project (Project)

angr.go.analyses.runtime_globals.is_readonly_data(project, addr)

addr lies in a read-only, non-code region of the main object.

Return type:

bool

Parameters:
angr.go.analyses.runtime_globals.is_writable_data(project, addr)

addr lies in a writable, non-executable region of the main object.

Return type:

bool

Parameters:
angr.go.analyses.runtime_globals.runtime_global_addr(project, name, kb=None)

The address of a runtime global: its data symbol, else the shape-located one (stripped/PE binaries).

Return type:

int | None

Parameters: