-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Wasmtime: Implement the custom-page-sizes proposal #8763
Commits on Jun 12, 2024
-
Wasmtime: Implement the custom-page-sizes proposal
This commit adds support for the custom-page-sizes proposal to Wasmtime: https://github.com/WebAssembly/custom-page-sizes I've migrated, fixed some bugs within, and extended the `*.wast` tests for this proposal from the `wasm-tools` repository. I intend to upstream them into the proposal shortly. There is a new `wasmtime::Config::wasm_custom_page_sizes_proposal` method to enable or disable the proposal. It is disabled by default. Our fuzzing config has been updated to turn this feature on/off as dictated by the arbitrary input given to us from the fuzzer. Additionally, there were getting to be so many constructors for `wasmtime::MemoryType` that I added a builder rather than add yet another constructor. In general, we store the `log2(page_size)` rather than the page size directly. This helps cut down on invalid states and properties we need to assert. I've also intentionally written this code such that supporting any power of two page size (rather than just the exact values `1` and `65536` that are currently valid) will essentially just involve updating `wasmparser`'s validation and removing some debug asserts in Wasmtime.
Configuration menu - View commit details
-
Copy full SHA for 4d6385b - Browse repository at this point
Copy the full SHA 4d6385bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c1e57a9 - Browse repository at this point
Copy the full SHA c1e57a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1657a78 - Browse repository at this point
Copy the full SHA 1657a78View commit details -
Configuration menu - View commit details
-
Copy full SHA for 25737d9 - Browse repository at this point
Copy the full SHA 25737d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for a48835d - Browse repository at this point
Copy the full SHA a48835dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b3d883 - Browse repository at this point
Copy the full SHA 3b3d883View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6506f27 - Browse repository at this point
Copy the full SHA 6506f27View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3c5a01 - Browse repository at this point
Copy the full SHA f3c5a01View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff8630b - Browse repository at this point
Copy the full SHA ff8630bView commit details -
Better handle overflows when rounding up to the host page size
Propagate errors instead of returning a value that is not actually a rounded up version of the input. Delay rounding up various config sizes until runtime instead of eagerly doing it at config time (which isn't even guaranteed to work, so we already had to have a backup plan to round up at runtime, since we might be cross-compiling wasm or not have the runtime feature enabled).
Configuration menu - View commit details
-
Copy full SHA for 3ce470c - Browse repository at this point
Copy the full SHA 3ce470cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83a5d78 - Browse repository at this point
Copy the full SHA 83a5d78View commit details -
Configuration menu - View commit details
-
Copy full SHA for 621f29d - Browse repository at this point
Copy the full SHA 621f29dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9de801 - Browse repository at this point
Copy the full SHA c9de801View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30ed095 - Browse repository at this point
Copy the full SHA 30ed095View commit details -
Avoid actually trying to allocate the whole address space in the `mas…
…sive_64_bit_still_limited` test The point of the test is to ensure that we hit the limiter, so just cancel the allocation from the limiter, and otherwise avoid MIRI attempting to allocate a bunch of memory after we hit the limiter.
Configuration menu - View commit details
-
Copy full SHA for 0b2ed81 - Browse repository at this point
Copy the full SHA 0b2ed81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fe8f3e - Browse repository at this point
Copy the full SHA 6fe8f3eView commit details -
Revert "Avoid actually trying to allocate the whole address space in …
…the `massive_64_bit_still_limited` test" This reverts commit ccfa34a.
Configuration menu - View commit details
-
Copy full SHA for 67c3506 - Browse repository at this point
Copy the full SHA 67c3506View commit details -
miri: don't attempt to allocate more than 4GiB of memory
It seems that rather than returning a null pointer from `std::alloc::alloc`, miri will sometimes choose to simply crash the whole program.
Configuration menu - View commit details
-
Copy full SHA for 68ad4ca - Browse repository at this point
Copy the full SHA 68ad4caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3732ec8 - Browse repository at this point
Copy the full SHA 3732ec8View commit details