cranelift-isle: Don't panic on too-large rule priorities#5236
Merged
Conversation
Found with ISLE's fuzzer.
This was referenced Nov 9, 2022
abrown
added a commit
to abrown/wasmtime
that referenced
this pull request
Dec 20, 2022
After bytecodealliance#5236, it is now easier to modify the `wasi-common` implementations (both `preview0` and `preview1`) to use `&self` instead of `&mut self` in their function signatures. This makes it possible to access and use a `WasiCtx` from an `Arc<Host>` (the top-level Wasmtime CLI structure holding the WASI implementations). An `Arc<Host>` will only give out immutable access to the WASI implementations it contains. This relies on bytecodealliance#5428 to configure Wiggle to emit `&self`-receiving traits. This change also wraps `wasi-common`'s source of randomness in `WasiCtx` with a `Mutex` to enable this `&mut self` to `&self` refactoring. One remaining issue to figure out with this change is the interaction with the `async` side of wiggle. E.g., `cargo build --all-features -p wasmtime-wasi` will fail due to the `tokyo` feature being enabled. The errors have to do with incorrect `Send` and `Sync` bounds on various parts of the Wiggle-generated API. We had previously discussed turning off these `async` parts when the `wasi-threads` feature is enabled, or at least prevent these features from being enabled at the same time, since as-is even `cargo test --all` is affected.
abrown
added a commit
to abrown/wasmtime
that referenced
this pull request
Jan 6, 2023
After bytecodealliance#5236, it is now easier to modify the `wasi-common` implementations (both `preview0` and `preview1`) to use `&self` instead of `&mut self` in their function signatures. This makes it possible to access and use a `WasiCtx` from an `Arc<Host>` (the top-level Wasmtime CLI structure holding the WASI implementations). An `Arc<Host>` will only give out immutable access to the WASI implementations it contains. This relies on bytecodealliance#5428 to configure Wiggle to emit `&self`-receiving traits. This change also wraps `wasi-common`'s source of randomness in `WasiCtx` with a `Mutex` to enable this `&mut self` to `&self` refactoring. One remaining issue to figure out with this change is the interaction with the `async` side of wiggle. E.g., `cargo build --all-features -p wasmtime-wasi` will fail due to the `tokyo` feature being enabled. The errors have to do with incorrect `Send` and `Sync` bounds on various parts of the Wiggle-generated API. We had previously discussed turning off these `async` parts when the `wasi-threads` feature is enabled, or at least prevent these features from being enabled at the same time, since as-is even `cargo test --all` is affected.
abrown
added a commit
to abrown/wasmtime
that referenced
this pull request
Jan 9, 2023
After bytecodealliance#5236, it is now easier to modify the `wasi-common` implementations (both `preview0` and `preview1`) to use `&self` instead of `&mut self` in their function signatures. This makes it possible to access and use a `WasiCtx` from an `Arc<Host>` (the top-level Wasmtime CLI structure holding the WASI implementations). An `Arc<Host>` will only give out immutable access to the WASI implementations it contains. This relies on bytecodealliance#5428 to configure Wiggle to emit `&self`-receiving traits. This change also wraps `wasi-common`'s source of randomness in `WasiCtx` with a `Mutex` to enable this `&mut self` to `&self` refactoring. One remaining issue to figure out with this change is the interaction with the `async` side of wiggle. E.g., `cargo build --all-features -p wasmtime-wasi` will fail due to the `tokyo` feature being enabled. The errors have to do with incorrect `Send` and `Sync` bounds on various parts of the Wiggle-generated API. We had previously discussed turning off these `async` parts when the `wasi-threads` feature is enabled, or at least prevent these features from being enabled at the same time, since as-is even `cargo test --all` is affected.
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.
Found with ISLE's fuzzer.