Skip to content

generate precise traps in fused component adapters #11683

@dicej

Description

@dicej

As of this writing, the fused adapter compiler in wasmtime-environ generates unreachable instructions to trap in various scenarios, e.g. when a component instance tries to call an import when that is disallowed. It also generates metadata to record the precise reason for the trap and stores that in fact::trampoline::Compiler::traps. However, that metadata isn't used anywhere, so at runtime the user always sees the generic "wasm `unreachable` instruction executed" message; the precise reason is no longer available. Consequently, we've had to temporarily fork a few spec tests which expect precise trap messages, replacing them with generic ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasm-proposal:component-modelIssues related to the WebAssembly Component Model proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions