Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix signatures registered with modules-in-components #6694

Conversation

alexcrichton
Copy link
Member

This commit fixes a minor issue in
FunctionIndices::link_and_append_code which previously ended up only filling out the wasm_to_native_trampolines field for the first module rather than all the modules. Additionally the first module might have too many entries that encompass all modules instead of just its own entries. The fix in this commit is to refactor this logic to ensure that the necessary maps are present for all translations.

While technically a bug that can be surfaced through the embedder API it's pretty obscure. The given test here panics beforehand but succeeds afterwards, but this is moreso prep for some future resource-related work where this map will need persisting into the component metadata side of things.

This commit fixes a minor issue in
`FunctionIndices::link_and_append_code` which previously ended up only
filling out the `wasm_to_native_trampolines` field for the first module
rather than all the modules. Additionally the first module might have
too many entries that encompass all modules instead of just its own
entries. The fix in this commit is to refactor this logic to ensure that
the necessary maps are present for all translations.

While technically a bug that can be surfaced through the embedder API
it's pretty obscure. The given test here panics beforehand but succeeds
afterwards, but this is moreso prep for some future resource-related
work where this map will need persisting into the component metadata
side of things.
@alexcrichton alexcrichton requested a review from a team as a code owner July 5, 2023 21:48
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team July 5, 2023 21:48
@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jul 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@fitzgen fitzgen added this pull request to the merge queue Jul 6, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 6, 2023
@alexcrichton alexcrichton added this pull request to the merge queue Jul 6, 2023
Merged via the queue into bytecodealliance:main with commit e6ef1ba Jul 6, 2023
19 checks passed
@alexcrichton alexcrichton deleted the fix-component-wasm-to-native-trampolines branch July 6, 2023 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants