[PATCH] D17479: [sanitizer] Move recvmsg and recv interceptors to sanitizer_common.

Maxim Ostapenko via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 04:28:59 PST 2016


m.ostapenko retitled this revision from "[asan] Add new recv and recvfrom interceptors." to "[sanitizer] Move recvmsg and recv interceptors to sanitizer_common.".
m.ostapenko updated the summary for this revision.
m.ostapenko added a reviewer: dvyukov.
m.ostapenko updated this revision to Diff 48907.
m.ostapenko added a comment.

OK, let's try more. Moved recvfrom and recv interceptors from TSan and MSan to sanitizer_common. I'm adding Dmitry to reviewers because this change affects TSan. The testcase for ASan may look scary at first glance, but actually it's quite simple:

1. Create simple UDP server in thread 1 and wait for a message. The size of allocated destination buffer is less then expected message length.
2. Create simple UDP client in thread 0 and send the message.
3. Crash in recvfrom function due to buffer overflow.


Repository:
  rL LLVM

http://reviews.llvm.org/D17479

Files:
  lib/msan/msan_interceptors.cc
  lib/sanitizer_common/sanitizer_common_interceptors.inc
  lib/sanitizer_common/sanitizer_platform_interceptors.h
  lib/tsan/rtl/tsan_interceptors.cc
  test/asan/TestCases/Linux/recvfrom.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17479.48907.patch
Type: text/x-patch
Size: 7141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160224/fac61088/attachment.bin>


More information about the llvm-commits mailing list