fitzgen opened PR #14315 from fitzgen:issue-14301-type-index-assertion-failure to bytecodealliance:main:
We would interpret the
externrefas having a type ofVMSharedTypeIndex::reserve_value(), which triggered debug assertions, but since that is an invalid type index and therefore does not appear in e.g. any supertype arrays, it couldn't result in incorrect downcasts when debug assertions were disabled.The fix is to check the
VMGcKindwhen we'reref.testing ananyref, as it might be an internalizedexternref.Fixes #14301
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen requested wasmtime-compiler-reviewers for a review on PR #14315.
fitzgen requested wasmtime-core-reviewers for a review on PR #14315.
fitzgen requested alexcrichton for a review on PR #14315.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #14315 Fix debug assert in ref.test of any.convert_extern-internalized externrefs to the merge queue.
:check: alexcrichton merged PR #14315.
alexcrichton removed PR #14315 Fix debug assert in ref.test of any.convert_extern-internalized externrefs from the merge queue.
Last updated: Sep 20 2026 at 18:08 UTC