vouillon opened PR #13307 from vouillon:fix to bytecodealliance:main:
Add an i31 early-return at the entry of
DrcHeap::dec_ref_and_maybe_dealloc, matching the behavior of the originaldec_refhelper.
dec_ref_and_maybe_dealloclost its i31ref early-return whendec_refwas inlined into the deallocation loop (commit 5cca4370b5 in #12974), replacing the runtime check with adebug_assert!(!gc_ref.is_i31()). Callers likewrite_gc_ref(used by libcalls such asarray.copy) hand the destination ref directly todec_ref_and_maybe_deallocwithout filtering i31s, so any write that overwrites an i31ref slot trips the assertion.
vouillon requested pchickey for a review on PR #13307.
vouillon requested wasmtime-core-reviewers for a review on PR #13307.
github-actions[bot] added the label wasmtime:api on PR #13307.
github-actions[bot] added the label wasmtime:ref-types on PR #13307.
github-actions[bot] commented on PR #13307:
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: fitzgen submitted PR review:
Thanks!
fitzgen added PR #13307 Fix DRC panic when overwriting an i31ref slot to the merge queue.
:check: fitzgen merged PR #13307.
fitzgen removed PR #13307 Fix DRC panic when overwriting an i31ref slot from the merge queue.
Last updated: Jun 01 2026 at 09:49 UTC