-
Notifications
You must be signed in to change notification settings - Fork 21
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
what to set for max
on imported 64-bit memories
#33
Comments
Proposed llvm change: https://reviews.llvm.org/D143783 |
sbc100
added a commit
to llvm/llvm-project
that referenced
this issue
Feb 13, 2023
This is current limit in v8. See WebAssembly/memory64#33 how we might change this in the future. Differential Revision: https://reviews.llvm.org/D143783
CarlosAlbertoEnciso
pushed a commit
to SNSystems/llvm-debuginfo-analyzer
that referenced
this issue
Feb 14, 2023
This is current limit in v8. See WebAssembly/memory64#33 how we might change this in the future. Differential Revision: https://reviews.llvm.org/D143783
sbc100
pushed a commit
that referenced
this issue
Jun 12, 2024
veselypeta
pushed a commit
to veselypeta/cherillvm
that referenced
this issue
Aug 12, 2024
This is current limit in v8. See WebAssembly/memory64#33 how we might change this in the future. Differential Revision: https://reviews.llvm.org/D143783
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Imported, growable memories need to specify a max. In llvm, when we build a DLL, we generally don't care about the upper limit of the imported memory so we try to set the max max here:
https://github.com/llvm/llvm-project/blob/89197b59f597995ecb6b6dc2e262a1ecddeee901/lld/wasm/Writer.cpp#L351
For 32-bit memories the max is simple and obvious 2 ^ 32. For 64-bit memories it looks like 2 ^ 48 was chosen (most likely largely arbitrarily but IIRC that the size of the virtual address space on some 64-bit architectures?). However this currently run up against an implementation defined limit when trying to load such modules in v8:
So for now I think we can modify llvm to emit 2 ^ 34 as the max, but we should probably come up with some better way to signal that we don't care about the maximum, or agree a sensible implementation limit and then embed that into the tools.
The text was updated successfully, but these errors were encountered: