[PATCH] D19781: [ASan] Disable target-specific lowering of string functions.

Marcin Koƛcielnicki via llvm-commits llvm-commits at lists.llvm.org
Sun May 1 18:26:28 PDT 2016


koriakin created this revision.
koriakin added reviewers: kcc, eugenis, resistor.
koriakin added a subscriber: llvm-commits.
koriakin set the repository for this revision to rL LLVM.
koriakin added a project: Sanitizers.

CodeGen has hooks that allow targets to emit specialized code instead
of calls to memcmp, memchr, strcpy, stpcpy, strcmp, strlen, strnlen.
When AddressSanitizer is in use, this sidesteps its interceptors, resulting
in uninstrumented memory accesses.  To avoid that, make AddressSanitizer
mark the calls as nobuiltin, and make CodeGen respect the attribute.

Repository:
  rL LLVM

http://reviews.llvm.org/D19781

Files:
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/Transforms/Instrumentation/AddressSanitizer.cpp
  test/CodeGen/SystemZ/memchr-03.ll
  test/CodeGen/SystemZ/memcmp-03.ll
  test/CodeGen/SystemZ/strcmp-03.ll
  test/CodeGen/SystemZ/strcpy-02.ll
  test/CodeGen/SystemZ/strlen-03.ll
  test/Instrumentation/AddressSanitizer/str-nobuiltin.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19781.55766.patch
Type: text/x-patch
Size: 16010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160502/36eb18f0/attachment.bin>


More information about the llvm-commits mailing list