[PATCH] D107850: [WIP][asan] Implemented custom calling convention similar used by HWASan for X86. The feature should be code complete. The tests are coming in a later revision.

Kirill Stoimenov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 10 11:12:35 PDT 2021


kstoimenov created this revision.
kstoimenov added a reviewer: pcc.
Herald added subscribers: pengfei, hiraditya.
kstoimenov requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.

It uses the int_asan_check_memaccess intrinsic to instrument the code. The intrinsic is replaced by a call to a function which performs the access check. The generated function names encode the input register name as a number using Reg - X86::NoRegister formula. This is feature is enabled by the asan-optimize-callbacks LLVM flag.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107850

Files:
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
  llvm/lib/Target/X86/X86AsmPrinter.cpp
  llvm/lib/Target/X86/X86AsmPrinter.h
  llvm/lib/Target/X86/X86InstrCompiler.td
  llvm/lib/Target/X86/X86MCInstLower.cpp
  llvm/lib/Target/X86/X86RegisterInfo.td
  llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107850.365561.patch
Type: text/x-patch
Size: 20892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210810/a88c1bf3/attachment.bin>


More information about the llvm-commits mailing list