[PATCH] D46545: [sanitizer] Add fgets, fputs and puts into sanitizer_common
Peter Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 10 10:54:34 PDT 2018
Lekensteyn updated this revision to Diff 150656.
Lekensteyn added a comment.
Changed since last patch: small fix to make the fputs test deterministically fail. No further test regressions caught during `check-all`.
--- a/test/asan/TestCases/Posix/fgets_fputs.cc
+++ b/test/asan/TestCases/Posix/fgets_fputs.cc
@@ -17,7 +17,7 @@ int test_fgets() {
int test_fputs() {
FILE *fp = fopen("/dev/null", "w");
- char buf[2];
+ char buf[1] = { 'x' }; // Note: not nul-terminated
fputs(buf, fp); // BOOM
return fclose(fp);
}
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
test/msan/fgets_fputs.cc
test/sanitizer_common/TestCases/Posix/fgets.cc
test/sanitizer_common/TestCases/Posix/fputs_puts.cc
test/tsan/race_on_fputs.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46545.150656.patch
Type: text/x-patch
Size: 9444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180610/90a3db97/attachment.bin>
More information about the llvm-commits
mailing list