Module wasmer_vm::trap::traphandlers
source ยท Expand description
WebAssembly trap handling, which is built on top of the lower-level signalhandling mechanisms.
Structsยง
- TrapHandlerContext ๐Read-only information that is used by signal handlers to handle and recover from traps.
- Configuration for the runtime VM Currently only the stack size is configurable
Enumsยง
- UnwindReason ๐
Constantsยง
- TRAP_HANDLER ๐
- YIELDER ๐
Staticsยง
- DEFAULT_STACK_SIZE ๐
- MAGIC ๐
- PREV_SIGBUS ๐
- PREV_SIGFPE ๐
- PREV_SIGILL ๐
- PREV_SIGSEGV ๐
Functionsยง
- Catches any wasm traps that happen within the execution of
closure
, returning them as aResult
. - get_pc_sp ๐ โ
- This function is required to be called before any WebAssembly is entered. This will configure global state such as signal handlers to prepare the process to receive wasm traps.
- A module for registering a custom alternate signal stack (sigaltstack).
- When executing on the Wasm stack, temporarily switch back to the host stack to perform an operation that should not be constrainted by the Wasm stack limits.
- on_wasm_stack ๐Runs the given function on a separate stack so that its stack usage can be bounded. Stack overflows and other traps can be caught and execution returned to the root of the stack.
- platform_init ๐ โ
- process_illegal_op ๐ โ
- Raises a trap from inside library code immediately.
- Raises a user-defined trap immediately.
- Carries a Rust panic across wasm code and resumes the panic on the other side.
- Default stack size is 1MB.
- trap_handler ๐ โ
- unwind_with ๐ โ
- update_context ๐ โ
- Call the wasm function pointed to by
callee
.
Type Aliasesยง
- Function which may handle custom signals while processing traps.