[PATCH] D143783: [lld][WebAssembly] Limit size of shared 64-bit memories of 2^^34
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 15:00:07 PST 2023
sbc100 created this revision.
Herald added subscribers: pmatos, asb, wingo, ecnelises, sunfish, jgravelle-google, dschuff.
Herald added a project: All.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.
This is current limit in v8. See
https://github.com/WebAssembly/memory64/issues/33 how we might change
this in the future.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D143783
Files:
lld/wasm/Writer.cpp
Index: lld/wasm/Writer.cpp
===================================================================
--- lld/wasm/Writer.cpp
+++ lld/wasm/Writer.cpp
@@ -348,7 +348,12 @@
WasmSym::heapBase->setVA(memoryPtr);
}
- uint64_t maxMemorySetting = 1ULL << (config->is64.value_or(false) ? 48 : 32);
+ uint64_t maxMemorySetting = 1ULL << 32;
+ if (config->is64.value_or(false)) {
+ // TODO: Update once we decide on a reasonable limit here:
+ // https://github.com/WebAssembly/memory64/issues/33
+ maxMemorySetting = 1ULL << 34;
+ }
if (config->initialMemory != 0) {
if (config->initialMemory != alignTo(config->initialMemory, WasmPageSize))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143783.496610.patch
Type: text/x-patch
Size: 658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230210/e284e4ce/attachment-0001.bin>
More information about the llvm-commits
mailing list