alexcrichton assigned fitzgen to PR #9569.
alexcrichton requested fitzgen for a review on PR #9569.
alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #9569.
alexcrichton requested wasmtime-core-reviewers for a review on PR #9569.
alexcrichton opened PR #9569 from alexcrichton:heap-base-pointer
to bytecodealliance:main
(assigned to fitzgen):
Instead add a helper method to
Memory
which indicates whether the base pointer of memory can move. Use this and plumb the result around to the various locations that require it. This improves thereadonly
application of the base pointer in Cranelift by having the optimization kick in in more scenarios. It additionally fixes combining shared linear memories with 64-bit addressing or a page size of 1 by adding a runtime check before relocation of a linear memory that it's allowed to do so.A few codegen tests are added to ensure that
readonly
is applied where it wasn't previously and additionally a new*.wast
test was added with the cross product of various features of linear memories and some basic tests to ensure that the memories all work as expected.This refactoring fixes two preexisting issues about
shared
memories requiring a "static" memory style. The restriction is now based on whether the pointer can relocate or not and that's upheld via the new trait method added here.To account for these bug fixes the fuzzers have been updated to allow mixing the
threads
proposal withmemory64
orcustom-page-sizes
.Closes #4267
Closes #9523<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton commented on PR #9569:
I'll also notably point out that this is incompatible with
MemoryCreator
so I've filed #9568 to track that. I think there needs to be a good bit of refactoring of the internals of how we represent memory so I hope to tackle that next-ish.
github-actions[bot] commented on PR #9569:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "fuzzing", "wasmtime:api"Thus the following users have been cc'd because of the following labels:
- fitzgen: fuzzing
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen submitted PR review:
Really like this clean up, everything is much easier to follow now. Thanks!
alexcrichton updated PR #9569 (assigned to fitzgen).
alexcrichton has enabled auto merge for PR #9569.
alexcrichton merged PR #9569.
Last updated: Dec 23 2024 at 13:07 UTC