Reserve handle index 0 and add handle index max in Canonical ABI#284
Merged
Conversation
Closed
alexcrichton
approved these changes
Dec 5, 2023
alexcrichton
added a commit
to alexcrichton/wasmtime
that referenced
this pull request
Dec 8, 2023
This commit updates the allocation scheme for resources in the component model to start at 1 instead of 0 when communicating with components. This is an implementation of WebAssembly/component-model#284. While this broke a number of tests we have this shouldn't actually break any components in practice. The broken tests were all overly-precise in their assertions and error messages and this shouldn't idiomatically come up in any guest language, so this should not be a practically breaking change.
alexcrichton
added a commit
to alexcrichton/wasmtime
that referenced
this pull request
Dec 8, 2023
This commit updates the allocation scheme for resources in the component model to start at 1 instead of 0 when communicating with components. This is an implementation of WebAssembly/component-model#284. While this broke a number of tests we have this shouldn't actually break any components in practice. The broken tests were all overly-precise in their assertions and error messages and this shouldn't idiomatically come up in any guest language, so this should not be a practically breaking change. This change additionally places an upper limit on the maximum allocatable index at `1 << 30` which is also specified in the above PR.
Collaborator
|
I've posted bytecodealliance/wasmtime#7661 as the Wasmtime-side implementation change this correponds to |
Member
Author
|
Great! I'm thinking I'll wait another few days to see if there's any feedback and otherwise merge mid next week. |
alexcrichton
added a commit
to alexcrichton/wasmtime
that referenced
this pull request
Feb 21, 2024
This commit updates the allocation scheme for resources in the component model to start at 1 instead of 0 when communicating with components. This is an implementation of WebAssembly/component-model#284. While this broke a number of tests we have this shouldn't actually break any components in practice. The broken tests were all overly-precise in their assertions and error messages and this shouldn't idiomatically come up in any guest language, so this should not be a practically breaking change. This change additionally places an upper limit on the maximum allocatable index at `1 << 30` which is also specified in the above PR.
github-merge-queue Bot
pushed a commit
to bytecodealliance/wasmtime
that referenced
this pull request
Feb 21, 2024
This commit updates the allocation scheme for resources in the component model to start at 1 instead of 0 when communicating with components. This is an implementation of WebAssembly/component-model#284. While this broke a number of tests we have this shouldn't actually break any components in practice. The broken tests were all overly-precise in their assertions and error messages and this shouldn't idiomatically come up in any guest language, so this should not be a practically breaking change. This change additionally places an upper limit on the maximum allocatable index at `1 << 30` which is also specified in the above PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #282. In theory, this shouldn't be breaking since guest code shouldn't be depending on the precise index values they receive, treating them like opaque file-descriptor-like values.