Documentation
¶
Overview ¶
Package reentry measures risk R1 of docs/DESIGN.md: can a host, while a Go wasip1 guest is inside a //go:wasmimport call, call the guest's //go:wasmexport cabi_realloc and write the result into the block it returns? The canonical ABI needs exactly that to return a list or a string from a host function.
Realloc is the host side, written against wazero's api.Module so the test and the future canonical-ABI host share it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoRealloc = errors.New("guest exports no cabi_realloc")
ErrNoRealloc is returned when the guest exports no cabi_realloc.
Functions ¶
func CheckBlock ¶
CheckBlock refuses a block a guest's allocator returned unless it is aligned and lies inside a memory of memSize bytes. A hostile guest chooses p, so the sum is computed without overflow.
Types ¶
This section is empty.