[PATCH] D77437: [lld][WebAssembly] Handle 4gb max memories
    David Majnemer via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Apr  7 19:38:06 PDT 2020
    
    
  
majnemer 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;
----------------
Should this be 4294967295?
================
Comment at: lld/wasm/Writer.cpp:305
+    if (config->maxMemory > (1ULL << 32))
+      error("maximum memory too large, cannot be greater than 4294967296");
     out.memorySec->maxMemoryPages = config->maxMemory / WasmPageSize;
----------------
Ditto.
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