Stream: git-wasmtime

Topic: wasmtime / PR #4882 Cranelift: add a vreg limit check to ...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2022 at 01:47):

cfallin requested jameysharp for a review on PR #4882.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2022 at 01:47):

cfallin opened PR #4882 from vreg-limit to main:

Previously, Cranelift panicked (via a a panic in regalloc2) when the virtual-register limit of 2M (2^21) was reached. This resulted in a perplexing and unhelpful failure when the user provided a too-large input (such as the Wasm module in #4865).

This PR adds an explicit check when allocating vregs that fails with a "code too large" error when the limit is hit, producing output such as (on the minimized testcase from #4865):

Error: failed to compile wasm function 3785 at offset 0xa3f3

Caused by:
    Compilation error: Code for function is too large

Fixes #4865.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2022 at 16:59):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 08 2022 at 17:05):

cfallin merged PR #4882.


Last updated: Oct 23 2024 at 20:03 UTC