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

2019-06-26 Thread Guanzhong Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364468: [WebAssembly] Implement Address Sanitizer for Emscripten (authored by quantum, committed by ). Changed prior to commit: https://reviews.llvm.org/D63742?vs=206719&id=206732#toc Repository: rL

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

2019-06-26 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Remember to remove "A symbol __global_base is added so that code may know where the shadow memory ends and real memory begins." from the CL description. Repository: rG LLVM Github Monorepo

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

2019-06-26 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum updated this revision to Diff 206719. quantum added a comment. Split wasm-ld change into D63833 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63742/new/ https://reviews.llvm.org/D63742 Files: clang/lib/

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

2019-06-25 Thread Guanzhong Chen via Phabricator via cfe-commits
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) +Wasm

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

2019-06-25 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I wonder if we should use the linux/unix convention or `edata` `etext` and `end`? Terrible names obviously but there is precedent. I can't remember why I didn't do that for __data_end and __heap_base. If not, then perhaps this should be called __data_start to match th

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

2019-06-25 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: lld/wasm/Writer.cpp:228 + if (WasmSym::GlobalBase) +WasmSym::GlobalBase->setVirtualAddress(Config->GlobalBase); + Surly if emscripten is passing in --global-base it already knows this value? Otherwise lgtm. Perh

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

2019-06-24 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum created this revision. quantum added reviewers: tlively, aheejin. Herald added subscribers: llvm-commits, cfe-commits, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added projects: clang, LLVM. This diff enables address sanitizer on Emscripten. On Emscripten, real memory