[PATCH] D54739: [Sanitizer] intercept setvbuf on other platforms where it is supported
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 23:03:59 PST 2018
devnexen created this revision.
devnexen added reviewers: vitalybuka, krytarowski.
devnexen created this object with visibility "All Users".
Herald added subscribers: Sanitizers, llvm-commits, fedor.sergeev, kubamracek.
- Unit tests enabled only in platform tested.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D54739
Files:
lib/sanitizer_common/sanitizer_platform_interceptors.h
test/sanitizer_common/TestCases/NetBSD/setvbuf.cc
test/sanitizer_common/TestCases/Posix/setvbuf.cc
Index: test/sanitizer_common/TestCases/Posix/setvbuf.cc
===================================================================
--- test/sanitizer_common/TestCases/Posix/setvbuf.cc
+++ test/sanitizer_common/TestCases/Posix/setvbuf.cc
@@ -1,5 +1,8 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
+// TODO to test on those
+// UNSUPPORTED: linux solaris darwin
+
#include <stdio.h>
void print_something() {
Index: lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -516,7 +516,7 @@
#define SANITIZER_INTERCEPT_TTYENT SI_NETBSD
#define SANITIZER_INTERCEPT_PROTOENT SI_NETBSD
#define SANITIZER_INTERCEPT_NETENT SI_NETBSD
-#define SANITIZER_INTERCEPT_SETVBUF SI_NETBSD
+#define SANITIZER_INTERCEPT_SETVBUF (SI_NETBSD || SI_FREEBSD || SI_LINUX || SI_MAC)
#define SANITIZER_INTERCEPT_GETMNTINFO SI_NETBSD
#define SANITIZER_INTERCEPT_MI_VECTOR_HASH SI_NETBSD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54739.174724.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181120/d7265638/attachment.bin>
More information about the llvm-commits
mailing list