[PATCH] D77437: [lld][WebAssembly] Handle 4gb max memories

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 10:18:55 PDT 2020


tlively marked an inline comment as done.
tlively added inline comments.


================
Comment at: lld/wasm/Writer.cpp:290
+    if (config->initialMemory > (1ULL << 32))
+      error("initial memory too large, cannot be greater than 4294967296");
+    memoryPtr = config->initialMemory;
----------------
majnemer wrote:
> Should this be 4294967295?
No, we want to allow exactly 2^32 but nothing more. The highest possible index into a 4GB memory is  4294967295, but the size is still 4GB exactly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77437/new/

https://reviews.llvm.org/D77437





More information about the llvm-commits mailing list