[PATCH] D46141: [WebAssembly] Add --stack-first option which places the shadow stack at start of linear memory

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 03:25:00 PDT 2018


ncw accepted this revision.
ncw added a comment.
This revision is now accepted and ready to land.

Nice, looks safe and potentially useful.



================
Comment at: test/wasm/stack-first.test:3-4
+; memory.  In this case the --stack-first option is being passed along with a
+; stack size of 512.  This means (since the stack grows down) the stack pointer
+; global should be initialized to 512.
+
----------------
Could also test/assert the positions of some pieces of static data, and the __heap_base, ie check all the calculations are correct when `--stack-first` is used.


================
Comment at: wasm/Writer.cpp:645
+  // The fact that this comes last means that a malloc/brk implementation
+  // and grow the heap at runtime.
+  if (!Config->Relocatable) {
----------------
Broken sentence


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46141





More information about the llvm-commits mailing list