[PATCH] D63742: [WebAssembly] Implement Address Sanitizer for Emscripten

Guanzhong Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 25 10:35:32 PDT 2019


quantum marked an inline comment as done.
quantum added a comment.

As for the name, I think `__global_base` matches the command line flag and makes it more clear what controls it, so I lean towards that.



================
Comment at: lld/wasm/Writer.cpp:228
+  if (WasmSym::GlobalBase)
+    WasmSym::GlobalBase->setVirtualAddress(Config->GlobalBase);
+
----------------
sbc100 wrote:
> Surly if emscripten is passing in --global-base it already knows this value?  
> 
> Otherwise lgtm.   Perhaps split of the lld part into a separate change?
In theory, emscripten knows this value. But as some library code needs this information, the alternative would be to have build an object file with this information and link it in. Since we already have `__data_end` and `__heap_base`, I think it makes sense for this information to be available too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63742





More information about the cfe-commits mailing list