bytecodealliance / bytecodealliance/wasmtime

Investigate storing trap codes in instructions rather than a side table

Open
#4,298 1 comment 0 reactions 0 assignees View on GitHub
wasmtime
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

https://github.com/bytecodealliance/wasmtime/issues/3340, specifically this:

> Note that UDF has an immediate parameter, which could be used to address the second point to an extent, e.g. UDF #0xBAD could signify Cranelift-generated code.

got me wondering if we can store the `.wasmtime.traps` section directly in the text section instead of in a separate section of the executable. As a separate section this is somewhat hefty and would probably be much smaller if we simply stored the trap code in the instruction itself (like `#0xBAD` above).

I'm not sure if this is possible on all platforms though or whether it's even going to net us all that many savings. Not having to manage a side table of traps though would indeed simplify a number of pieces related to trap handling in Wasmtime.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.