[PATCH] D55605: [NewPM] Port Msan: Alternative approach using a module to create the global constructor

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 12 09:34:01 PST 2018


philip.pfaffe created this revision.
philip.pfaffe added reviewers: chandlerc, fedor.sergeev, leonardchan, vitalybuka.
Herald added subscribers: jsji, jfb, atanasyan, bollu, kbarton, hiraditya, javed.absar, nemanjai, sdardis.

Changes in particular:

- Pull sanitizer and wrapper pass apart
- Add a newpm msan and msan-init pass
- Update tests

Caveats:

- Getting the original msan behavior back requires scheduling both msan and msan-init.
- msan now tries to a few global variables and function declaration everytime it runs, i.e. for every function. I deduplicate the global variables by name and type, do I need more?
- I skip annotating the msan init function created by the init pass by name, which also might not suffice.


https://reviews.llvm.org/D55605

Files:
  clang/lib/CodeGen/BackendUtil.cpp
  llvm/bindings/go/llvm/InstrumentationBindings.cpp
  llvm/bindings/go/llvm/InstrumentationBindings.h
  llvm/bindings/go/llvm/transforms_instrumentation.go
  llvm/include/llvm/InitializePasses.h
  llvm/include/llvm/Transforms/Instrumentation.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
  llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
  llvm/test/Instrumentation/MemorySanitizer/AArch64/vararg.ll
  llvm/test/Instrumentation/MemorySanitizer/Mips/vararg-mips64.ll
  llvm/test/Instrumentation/MemorySanitizer/Mips/vararg-mips64el.ll
  llvm/test/Instrumentation/MemorySanitizer/PowerPC/vararg-ppc64.ll
  llvm/test/Instrumentation/MemorySanitizer/PowerPC/vararg-ppc64le.ll
  llvm/test/Instrumentation/MemorySanitizer/X86/vararg-too-large.ll
  llvm/test/Instrumentation/MemorySanitizer/X86/vararg.ll
  llvm/test/Instrumentation/MemorySanitizer/X86/vararg_call.ll
  llvm/test/Instrumentation/MemorySanitizer/alloca.ll
  llvm/test/Instrumentation/MemorySanitizer/array_types.ll
  llvm/test/Instrumentation/MemorySanitizer/atomics.ll
  llvm/test/Instrumentation/MemorySanitizer/byval-alignment.ll
  llvm/test/Instrumentation/MemorySanitizer/check-constant-shadow.ll
  llvm/test/Instrumentation/MemorySanitizer/check_access_address.ll
  llvm/test/Instrumentation/MemorySanitizer/csr.ll
  llvm/test/Instrumentation/MemorySanitizer/global_ctors_2to3.ll
  llvm/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll
  llvm/test/Instrumentation/MemorySanitizer/manual-shadow.ll
  llvm/test/Instrumentation/MemorySanitizer/masked-store-load.ll
  llvm/test/Instrumentation/MemorySanitizer/missing_origin.ll
  llvm/test/Instrumentation/MemorySanitizer/msan_asm_conservative.ll
  llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll
  llvm/test/Instrumentation/MemorySanitizer/msan_kernel_basic.ll
  llvm/test/Instrumentation/MemorySanitizer/msan_x86_bts_asm.ll
  llvm/test/Instrumentation/MemorySanitizer/msan_x86intrinsics.ll
  llvm/test/Instrumentation/MemorySanitizer/mul_by_constant.ll
  llvm/test/Instrumentation/MemorySanitizer/nosanitize.ll
  llvm/test/Instrumentation/MemorySanitizer/origin-alignment.ll
  llvm/test/Instrumentation/MemorySanitizer/origin-array.ll
  llvm/test/Instrumentation/MemorySanitizer/pr32842.ll
  llvm/test/Instrumentation/MemorySanitizer/return_from_main.ll
  llvm/test/Instrumentation/MemorySanitizer/store-long-origin.ll
  llvm/test/Instrumentation/MemorySanitizer/store-origin.ll
  llvm/test/Instrumentation/MemorySanitizer/str-nobuiltin.ll
  llvm/test/Instrumentation/MemorySanitizer/unreachable.ll
  llvm/test/Instrumentation/MemorySanitizer/unsized_type.ll
  llvm/test/Instrumentation/MemorySanitizer/vector_arith.ll
  llvm/test/Instrumentation/MemorySanitizer/vector_cmp.ll
  llvm/test/Instrumentation/MemorySanitizer/vector_cvt.ll
  llvm/test/Instrumentation/MemorySanitizer/vector_pack.ll
  llvm/test/Instrumentation/MemorySanitizer/vector_shift.ll
  llvm/test/Instrumentation/MemorySanitizer/with-call-type-size.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55605.177868.patch
Type: text/x-patch
Size: 74713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181212/6e9a81c6/attachment-0001.bin>


More information about the llvm-commits mailing list