rvolosatovs opened PR #13608 from rvolosatovs:fix/substituted_component_type to bytecodealliance:main:
I've encountered a panic working with guest-exported resources and
Linker::substituted_component_type:thread 'drives_score_utxo_resource' (8643070) panicked at /Users/rvolosatovs/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-45.0.1/src/runtime/component/matching.rs:208:27: index out of bounds: the len is 0 but the index is 0I had an LLM debug and add a test, which fails on current
mainwith:thread 'component_model::dynamic::substituted_component_type_with_exported_resource' (8668306) panicked at crates/wasmtime/src/runtime/component/matching.rs:208:27: index out of bounds: the len is 0 but the index is 0Other than me changing the commit message titles (and opening this PR/writing the description), this contribution is entirely LLM-generated, but reviewed by me.
The fix itself is a one-line change, which seems correct to me.
The analysis added by the LLM in the commits seems valid.
Test seems to make sense.This is my first LLM-assisted contribution to Wasmtime, I belive it's compliant with https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md, but please let me know if I have missed something.
rvolosatovs requested dicej for a review on PR #13608.
rvolosatovs requested wasmtime-core-reviewers for a review on PR #13608.
rvolosatovs edited PR #13608:
I've encountered a panic working with guest-exported resources and
Linker::substituted_component_type:thread 'drives_score_utxo_resource' (8643070) panicked at /Users/rvolosatovs/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-45.0.1/src/runtime/component/matching.rs:208:27: index out of bounds: the len is 0 but the index is 0I had an LLM debug and add a test, which fails on current
mainwith:thread 'component_model::dynamic::substituted_component_type_with_exported_resource' (8668306) panicked at crates/wasmtime/src/runtime/component/matching.rs:208:27: index out of bounds: the len is 0 but the index is 0Other than me changing the commit message titles (and opening this PR/writing the description), this contribution is entirely LLM-generated, but reviewed by me.
The fix itself is a one-line change, which seems correct to me.
The analysis added by the LLM in the commits seems valid.
Test seems to make sense - I guess we could make it shorter, but I'll leave this up to reviewers to decide.This is my first LLM-assisted contribution to Wasmtime, I belive it's compliant with https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md, but please let me know if I have missed something.
:thumbs_up: alexcrichton submitted PR review:
Thanks!
The only mild comment I'd have is that LLMs tend to be a bit too verbose in tests insofar as they try to document the exact state of the world before a test was added and when it was added, so the comment basically becomes irrelevant after a test lands. Not a huge thing though, so no worries.
alexcrichton added PR #13608 fix: substituted_component_type panic on guest-exported resources to the merge queue.
:check: alexcrichton merged PR #13608.
alexcrichton removed PR #13608 fix: substituted_component_type panic on guest-exported resources from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC