angelnereira opened PR #13472 from angelnereira:gc-funcref-type-check-bail to bytecodealliance:main:
Summary
- Replace the GC funcref table subtype assertion with bail_bug so corrupted funcref table IDs are reported as controlled internal errors instead of panicking in release builds.
- Add a focused regression test for mismatched typed funcref table lookups.
Context
This follows the defense-in-depth direction discussed in #13216: GC heap corruption checks should prefer controlled internal errors where the surrounding code can already return Result.
Testing
- cargo fmt --all -- --check
- cargo check -p wasmtime
- cargo test -p wasmtime typed_get_rejects_mismatched_func_type
- git diff --check
angelnereira requested pchickey for a review on PR #13472.
angelnereira requested wasmtime-core-reviewers for a review on PR #13472.
github-actions[bot] added the label wasmtime:ref-types on PR #13472.
github-actions[bot] added the label wasmtime:api on PR #13472.
github-actions[bot] commented on PR #13472:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:ref-types"Thus the following users have been cc'd because of the following labels:
- fitzgen: wasmtime:ref-types
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
:thumbs_up: alexcrichton submitted PR review.
:speech_balloon: alexcrichton created PR review comment:
It's ok to skip the test on this one, we don't really have a great way of testing internal assertions and
bail_bug!, and that's just something we'll have to live with over time. I'd prefer to avoid testing internal details like this as an alternative.
Last updated: Jun 01 2026 at 09:49 UTC