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

Guanzhong Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 15:45:55 PDT 2019


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 starts at the value passed to --global-base.

All memory before this is used as shadow memory, and thus the shadow mapping
function is simply dividing by 8.

A symbol __global_base is added so that code may know where the shadow
memory ends and real memory begins.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63742

Files:
  clang/lib/Driver/ToolChains/WebAssembly.cpp
  clang/test/Driver/wasm-toolchain.c
  lld/test/wasm/global-base.ll
  lld/wasm/Driver.cpp
  lld/wasm/Symbols.cpp
  lld/wasm/Symbols.h
  lld/wasm/Writer.cpp
  llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63742.206315.patch
Type: text/x-patch
Size: 8274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190624/dc2f070e/attachment.bin>


More information about the cfe-commits mailing list