[PATCH] D46545: [sanitizer] Move fgets, fputs and puts into sanitizer_common

Peter Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 7 13:06:59 PDT 2018


Lekensteyn created this revision.
Lekensteyn added reviewers: vitalybuka, bruening, m.ostapenko, krytarowski, kcc, eugenis.
Lekensteyn added a project: Sanitizers.
Herald added subscribers: Sanitizers, llvm-commits, kubamracek.

Remove puts from tsan (and esan?!). Add puts and fputs to
sanitizer_common. Move fgets from msan, but with an important
difference: rather than checking/unpoisoning the string size (based on
strlen) it checks the whole buffer size. This fixes potential false
negatives with ASAN at the cost of false negatives for MSAN.

Fixes: https://github.com/google/sanitizers/issues/952


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D46545

Files:
  lib/esan/esan_interceptors.cpp
  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/Posix/fgets_fputs.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46545.145520.patch
Type: text/x-patch
Size: 6683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180507/36f7567d/attachment.bin>


More information about the llvm-commits mailing list