[PATCH] D58379: [compiler-rt] Intercept the bcmp() function.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 01:11:00 PST 2019


courbet created this revision.
courbet added reviewers: mgorny, krytarowski, vitalybuka, dvyukov.
Herald added subscribers: Sanitizers, jdoerfert, delcypher, dberris, kubamracek.
Herald added projects: LLVM, Sanitizers.

I have not introduced a separate hook for `bcmp()` as I don't think there
should be any reason for a sanitizer to treat it differently from `memcmp()`.

This is only enabled when building on POSIX with GNU extensions.

Context: this is to avoid losing coverage when emitting `bcmp() == 0` instead
of `memcmp() == 0` in llvm, see https://reviews.llvm.org/D56593.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D58379

Files:
  lib/asan/tests/asan_mem_test.cc
  lib/sanitizer_common/sanitizer_common_interceptors.inc
  lib/sanitizer_common/sanitizer_platform_interceptors.h
  test/asan/TestCases/Posix/bcmp_test.cc
  test/sanitizer_common/TestCases/Posix/weak_hook_test.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58379.187324.patch
Type: text/x-patch
Size: 7288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190219/3c3b3604/attachment.bin>


More information about the llvm-commits mailing list