Skip to content

Fix an issue in adapter module partitioning#4622

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-dfg-panic
Aug 5, 2022
Merged

Fix an issue in adapter module partitioning#4622
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-dfg-panic

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

When an adapter module depends on a particular core wasm instance this
means that it actually depends on not only that instance but all prior
core wasm instances as well. This is because core wasm instances must be
instantiated in the specified order within a component and that cannot
change depending on the dataflow between adapters. This commit fixes a
possible panic from linearizing the component dfg where an adapter
module tried to depend on an instance that hadn't been instantiated yet
because the ordering dependency between core wasm instances hadn't been
modeled.

When an adapter module depends on a particular core wasm instance this
means that it actually depends on not only that instance but all prior
core wasm instances as well. This is because core wasm instances must be
instantiated in the specified order within a component and that cannot
change depending on the dataflow between adapters. This commit fixes a
possible panic from linearizing the component dfg where an adapter
module tried to depend on an instance that hadn't been instantiated yet
because the ordering dependency between core wasm instances hadn't been
modeled.
@alexcrichton alexcrichton requested a review from peterhuene August 5, 2022 01:01
@alexcrichton
Copy link
Copy Markdown
Member Author

Note that for the test here I lifed it from #4605 and cleaned it up slightly

@alexcrichton alexcrichton enabled auto-merge (squash) August 5, 2022 01:06
@alexcrichton alexcrichton merged commit 1ce9e8a into bytecodealliance:main Aug 5, 2022
@alexcrichton alexcrichton deleted the fix-dfg-panic branch August 5, 2022 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants