[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
Tue Nov 20 01:56:13 PST 2018


devnexen updated this revision to Diff 174735.

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,7 @@
 // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
 
+// UNSUPPORTED: solaris
+
 #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,8 @@
 #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.174735.patch
Type: text/x-patch
Size: 1039 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181120/0ec21394/attachment.bin>


More information about the llvm-commits mailing list