Trap codes for instruction traps.
| Enumerator |
|---|
| WASMTIME_TRAP_CODE_STACK_OVERFLOW | The current stack space was exhausted.
|
| WASMTIME_TRAP_CODE_MEMORY_OUT_OF_BOUNDS | An out-of-bounds memory access.
|
| WASMTIME_TRAP_CODE_HEAP_MISALIGNED | A wasm atomic operation was presented with a not-naturally-aligned linear-memory address.
|
| WASMTIME_TRAP_CODE_TABLE_OUT_OF_BOUNDS | An out-of-bounds access to a table.
|
| WASMTIME_TRAP_CODE_INDIRECT_CALL_TO_NULL | Indirect call to a null table entry.
|
| WASMTIME_TRAP_CODE_BAD_SIGNATURE | Signature mismatch on indirect call.
|
| WASMTIME_TRAP_CODE_INTEGER_OVERFLOW | An integer arithmetic operation caused an overflow.
|
| WASMTIME_TRAP_CODE_INTEGER_DIVISION_BY_ZERO | An integer division by zero.
|
| WASMTIME_TRAP_CODE_BAD_CONVERSION_TO_INTEGER | Failed float-to-int conversion.
|
| WASMTIME_TRAP_CODE_UNREACHABLE_CODE_REACHED | Code that was supposed to have been unreachable was reached.
|
| WASMTIME_TRAP_CODE_INTERRUPT | Execution has potentially run too long and may be interrupted.
|
| WASMTIME_TRAP_CODE_OUT_OF_FUEL | Execution has run out of the configured fuel amount.
|
| WASMTIME_TRAP_CODE_ATOMIC_WAIT_NON_SHARED_MEMORY | Used to indicate that a trap was raised by atomic wait operations on non shared memory.
|
| WASMTIME_TRAP_CODE_NULL_REFERENCE | Call to a null reference.
|
| WASMTIME_TRAP_CODE_ARRAY_OUT_OF_BOUNDS | Attempt to access beyond the bounds of an array.
|
| WASMTIME_TRAP_CODE_ALLOCATION_TOO_LARGE | Attempted an allocation that was too large to succeed.
|
| WASMTIME_TRAP_CODE_CAST_FAILURE | Attempted to cast a reference to a type that it is not an instance of.
|
| WASMTIME_TRAP_CODE_CANNOT_ENTER_COMPONENT | When the component-model feature is enabled this trap represents a scenario where one component tried to call another component but it would have violated the reentrance rules of the component model, triggering a trap instead.
|
| WASMTIME_TRAP_CODE_NO_ASYNC_RESULT | Async-lifted export failed to produce a result by calling task.return before returning STATUS_DONE and/or after all host tasks completed.
|
| WASMTIME_TRAP_CODE_UNHANDLED_TAG | We are suspending to a tag for which there is no active handler.
|
| WASMTIME_TRAP_CODE_CONTINUATION_ALREADY_CONSUMED | Attempt to resume a continuation twice.
|
| WASMTIME_TRAP_CODE_DISABLED_OPCODE | A Pulley opcode was executed at runtime when the opcode was disabled at compile time.
|
| WASMTIME_TRAP_CODE_ASYNC_DEADLOCK | Async event loop deadlocked; i.e. it cannot make further progress given that all host tasks have completed and any/all host-owned stream/future handles have been dropped.
|
| WASMTIME_TRAP_CODE_CANNOT_LEAVE_COMPONENT | When the component-model feature is enabled this trap represents a scenario where a component instance tried to call an import or intrinsic when it wasn't allowed to, e.g. from a post-return function.
|
| WASMTIME_TRAP_CODE_CANNOT_BLOCK_SYNC_TASK | A synchronous task attempted to make a potentially blocking call prior to returning.
|
| WASMTIME_TRAP_CODE_INVALID_CHAR | A component tried to lift a char with an invalid bit pattern.
|
| WASMTIME_TRAP_CODE_DEBUG_ASSERT_STRING_ENCODING_FINISHED | Debug assertion generated for a fused adapter regarding the expected completion of a string encoding operation.
|
| WASMTIME_TRAP_CODE_DEBUG_ASSERT_EQUAL_CODE_UNITS | Debug assertion generated for a fused adapter regarding a string encoding operation.
|
| WASMTIME_TRAP_CODE_DEBUG_ASSERT_POINTER_ALIGNED | Debug assertion generated for a fused adapter regarding the alignment of a pointer.
|
| WASMTIME_TRAP_CODE_DEBUG_ASSERT_UPPER_BITS_UNSET | Debug assertion generated for a fused adapter regarding the upper bits of a 64-bit value.
|
| WASMTIME_TRAP_CODE_STRING_OUT_OF_BOUNDS | A component tried to lift or lower a string past the end of its memory.
|
| WASMTIME_TRAP_CODE_LIST_OUT_OF_BOUNDS | A component tried to lift or lower a list past the end of its memory.
|
| WASMTIME_TRAP_CODE_INVALID_DISCRIMINANT | A component used an invalid discriminant when lowering a variant value.
|
| WASMTIME_TRAP_CODE_UNALIGNED_POINTER | A component passed an unaligned pointer when lifting or lowering a value.
|
| WASMTIME_TRAP_CODE_TASK_CANCEL_NOT_CANCELLED | task.cancel invoked in an invalid way.
|
| WASMTIME_TRAP_CODE_TASK_CANCEL_OR_RETURN_TWICE | task.cancel or task.return called too many times
|
| WASMTIME_TRAP_CODE_SUBTASK_CANCEL_AFTER_TERMINAL | subtask.cancel invoked after it already finished.
|
| WASMTIME_TRAP_CODE_TASK_RETURN_INVALID | task.return invoked with an invalid type.
|
| WASMTIME_TRAP_CODE_WAITABLE_SET_DROP_HAS_WAITERS | waitable-set.drop invoked on a waitable set with waiters.
|
| WASMTIME_TRAP_CODE_SUBTASK_DROP_NOT_RESOLVED | subtask.drop invoked on a subtask that hasn't resolved yet.
|
| WASMTIME_TRAP_CODE_THREAD_NEW_INDIRECT_INVALID_TYPE | thread.new-indirect invoked with a function that has an invalid type.
|
| WASMTIME_TRAP_CODE_THREAD_NEW_INDIRECT_UNINITIALIZED | thread.new-indirect invoked with an uninitialized function reference.
|
| WASMTIME_TRAP_CODE_BACKPRESSURE_OVERFLOW | Backpressure-related intrinsics overflowed the built-in counter.
|
| WASMTIME_TRAP_CODE_UNSUPPORTED_CALLBACK_CODE | Invalid code returned from callback of async-lifted function.
|
| WASMTIME_TRAP_CODE_CANNOT_RESUME_THREAD | Cannot resume a thread which is not suspended.
|
| WASMTIME_TRAP_CODE_CONCURRENT_FUTURE_STREAM_OP | Cannot issue a read/write on a future/stream while there is a pending operation already.
|
| WASMTIME_TRAP_CODE_REFERENCE_COUNT_OVERFLOW | A reference count (for e.g. an error-context) overflowed.
|
| WASMTIME_TRAP_CODE_STREAM_OP_TOO_BIG | A read/write on a stream must be <2**28 items.
|
| WASMTIME_TRAP_CODE_WAITABLE_SYNC_AND_ASYNC | The guest either attempted to add a waitable to a waitable set while it was being used in a synchronous operation or tried to use it in a synchronous operation while it was added to a waitable set.
|