-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge with upstream #238
Merge with upstream #238
Commits on Oct 10, 2024
-
Implement the Wasm GC instructions for converting between
anyref
an……d `externref` (bytecodealliance#9435) * Implement the Wasm GC instructions for converting between `anyref` and `externref` This commit implements two instructions: 1. `any.convert_extern` 2. `extern.convert_any` These instructions are used to convert between `anyref` and `externref` values. The `any.convert_extern` instruction takes an `anyref` value and converts it to an `externref` value. The `extern.convert_any` instruction takes an `externref` value and converts it to an `anyref` value. Rather than implementing wrapper objects -- for example an `struct AnyOfExtern(ExternRef)` type that is a subtype of `AnyRef` -- we instead reuse the same representation converted references as their unconverted reference. For example, `(any.convert_extern my_externref)` is identical to the original `my_externref` value. This means that we don't actually emit any clif instructions to implement these Wasm instructions; they are no-ops! Wasm code remains none-the-wiser because it cannot directly test for the difference between, for example, a `my_anyref` and the result of `(extern.convert_any my_anyref)` because they are in two different type hierarchies, so any direct `ref.test` would be invalid. The Wasm code would have to convert one into the other's type hierarchy, at which point it doesn't know whether wrapping/unwrapping took place. We did need some changes at the host API and host API implementation levels, however: * We needed to relax the requirement that a `wasmtime::AnyRef` only wraps a `VMGcRef` that points to an object that is a subtype of `anyref` and similar for `wasmtime::ExternRef`. * We needed to make the `wasmtime::ExternRef::data[_mut]` methods return an option of their associated host data, since any `externref` resulting from `(extern.convert_any ...)` does not have any associated host data. (This change would have been required either way, even if we used wrapper objects.) * fix tests * fix wasmtime-environ tests
Configuration menu - View commit details
-
Copy full SHA for 12c20b2 - Browse repository at this point
Copy the full SHA 12c20b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7bdb25e - Browse repository at this point
Copy the full SHA 7bdb25eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d5652f5 - Browse repository at this point
Copy the full SHA d5652f5View commit details -
Implement the
br_on_cast[_fail]
Wasm GC instructions (bytecodeallia……nce#9438) Just gluing our existing `ref.test` and conditional branching support together.
Configuration menu - View commit details
-
Copy full SHA for a94c775 - Browse repository at this point
Copy the full SHA a94c775View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae088ed - Browse repository at this point
Copy the full SHA ae088edView commit details -
Document a Wasmtime-specific vulnerability runbook (bytecodealliance#…
…9433) This commit codifies the process [documented here](https://github.com/bytecodealliance/rfcs/blob/main/accepted/vulnerability-response-runbook.md) in the Wasmtime repository as it relates to Wasmtime itself. There's also a few minor changes from recent advisories such as: * We'll no longer use the publish-the-changes-from-the-advisory feature from GitHub. That basically just doesn't work any more. * PRs will instead be manually created to have CI run on them to weed out any issues. * Details about preparing the `main` branch ahead of the release are interleaved with the rest of the runbook. The intention is to supplement the official runbook with Wasmtime-specific information and flesh out a few minor steps we're following that are "extra" here too.
Configuration menu - View commit details
-
Copy full SHA for 866ede9 - Browse repository at this point
Copy the full SHA 866ede9View commit details -
Enable some miscellaneous Wasm GC spec tests; fix module import/expor…
…t linking and subtyping (bytecodealliance#9446) * Enable some miscellaneous GC spec tests These weren't caught by our checks that `should_fail` tests do not pass, I think because they only contain modules that should validate, and not any actual assertions. * Require declared subtyping when linking module import/export functions We were previously incorrectly doing a (shallow) match on structure when we should have been doing a subtyping check.
Configuration menu - View commit details
-
Copy full SHA for 0146260 - Browse repository at this point
Copy the full SHA 0146260View commit details -
Add missing pooling allocator options as CLI flags (bytecodealliance#…
…9256) (bytecodealliance#9447) * Update `decommit_batch_size` type to `usize` * Add missing pooling options to `OptimizeOptions` * Add new pooling options to configuration * Add `max_memory_protection_keys` option also rename `memory_protection_keys` to `pooling_memory_protection_keys` * Add `total_gc_heaps` option * Add default options in comments
Configuration menu - View commit details
-
Copy full SHA for f59cad1 - Browse repository at this point
Copy the full SHA f59cad1View commit details -
Update wit-bindgen dependencies (bytecodealliance#9421)
Help trim version of wasm-tools crates.
Configuration menu - View commit details
-
Copy full SHA for 964360a - Browse repository at this point
Copy the full SHA 964360aView commit details -
Update docs/stabilization of wasm proposals (bytecodealliance#9434)
* Update docs/stabilization of wasm proposals This commit updates our documentation and documented status of various WebAssembly proposals. The goal of this commit it to explicitly list all requirements for each WebAssembly proposal in a way such that enabling a feature requires actively checking this table and performing effort to fill in. This is intended to mitigate GHSA-q8hx-mm92-4wvg where it was found that we were accidentally not fuzzing tail calls but had enabled it by default. This shuffles around some documentation, modernizes a bit, and notably tries to list out a green checkbox or red X for the status of various proposals. Notes for "holes" in the "on by default matrix" are also added. * Add a link to the GC tracking issue * Tweak the list of supported targets Android is listed in Tier 3 now
Configuration menu - View commit details
-
Copy full SHA for a8998e7 - Browse repository at this point
Copy the full SHA a8998e7View commit details -
Implement subtype checking for
[return_]call_indirect
instructions (b……ytecodealliance#9448) * Implement subtype checking for `[return_]call_indirect` instructions When Wasm GC is enabled, the `[return_]call_indirect` instructions must do full subtyping checks, rather than simple strict equality type checks. This adds an additional branch and slow path to indirect calls, so we only emit code for this check when Wasm GC is enabled, even though it would otherwise be correct to always emit it (because the `is_subtype` check would always fail for non-equal types, since there is no subtyping before Wasm GC). * fix no-gc builds
Configuration menu - View commit details
-
Copy full SHA for 7c96aa1 - Browse repository at this point
Copy the full SHA 7c96aa1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a31606 - Browse repository at this point
Copy the full SHA 1a31606View commit details
Commits on Oct 11, 2024
-
Add some disas tests for a few more Wasm GC instructions (bytecodeall…
…iance#9453) This helps us keep track of their code quality, and the way that some of them are reusing our implementation of `ref.test`.
Configuration menu - View commit details
-
Copy full SHA for ec05264 - Browse repository at this point
Copy the full SHA ec05264View commit details -
Add a test that fuzzers generate wasm proposals (bytecodealliance#9452)
This commit adds a test to the `wasmtime-fuzzing` crate as a sanity-check that eventually a module is generated requiring all of the features that wasmtime supports. This is intended to be another double-check in the process of enabling a proposal in Wasmtime by ensuring that the feature is added to this list which then transitively requires that fuzzing eventually generates a module needing that feature. cc bytecodealliance#9449
Configuration menu - View commit details
-
Copy full SHA for ad6030f - Browse repository at this point
Copy the full SHA ad6030fView commit details -
Add support for initializing/getting/setting
funcref
s in GC structs…… from host APIs (bytecodealliance#9454) * Add support for initializing/getting/setting `funcref`s in GC structs from host APIs We implemented support for `funcref`s in both Wasm and host APIs for arrays, but somehow only implemented support for `funcref`s in structs for compiled Wasm code, and mistakenly forgot about them for structs and host APIs (and things that use host APIs, such as const expressions). * fix clippy
Configuration menu - View commit details
-
Copy full SHA for 9529243 - Browse repository at this point
Copy the full SHA 9529243View commit details -
Add the
wasmtime::NoneRef
host API type for Wasm's `(ref null? none……)` instances (bytecodealliance#9455)
Configuration menu - View commit details
-
Copy full SHA for 939917d - Browse repository at this point
Copy the full SHA 939917dView commit details -
Centralize wasm-features-in-fuzzing a bit more (bytecodealliance#9450)
Move everything into the same location about what features are enabled, which are disabled, and such. Also statically enumerate all the features that wasm-smith enables for us and acknowledge that here too.
Configuration menu - View commit details
-
Copy full SHA for 292f136 - Browse repository at this point
Copy the full SHA 292f136View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0da9592 - Browse repository at this point
Copy the full SHA 0da9592View commit details