From 205b7093669382fe21554bdfb325a8e17b379e03 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 2 Jan 2019 19:07:27 +0000 Subject: [PATCH] [Sanitizer] Enable funopen on FreeBSD Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56209 llvm-svn: 350248 --- .../lib/sanitizer_common/sanitizer_platform_interceptors.h | 2 +- .../sanitizer_common/TestCases/{NetBSD => Posix}/funopen.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) rename compiler-rt/test/sanitizer_common/TestCases/{NetBSD => Posix}/funopen.cc (98%) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index 1c60e514a1a3..c27a62e76233 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -551,7 +551,7 @@ #define SANITIZER_INTERCEPT_POPEN SI_POSIX #define SANITIZER_INTERCEPT_POPENVE SI_NETBSD #define SANITIZER_INTERCEPT_PCLOSE SI_POSIX -#define SANITIZER_INTERCEPT_FUNOPEN SI_NETBSD +#define SANITIZER_INTERCEPT_FUNOPEN (SI_NETBSD || SI_FREEBSD) #define SANITIZER_INTERCEPT_FUNOPEN2 SI_NETBSD #endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/funopen.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/funopen.cc similarity index 98% rename from compiler-rt/test/sanitizer_common/TestCases/NetBSD/funopen.cc rename to compiler-rt/test/sanitizer_common/TestCases/Posix/funopen.cc index 6c0e6c22fc95..7d32830be378 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/funopen.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/funopen.cc @@ -10,6 +10,8 @@ // CHECK-NEXT: SEEK CALLED; off=100, whence=0 // CHECK-NEXT: READ CALLED; len={{[0-9]*}} // CHECK-NEXT: READ: test +// +// UNSUPPORTED: linux. darwin, solaris #include #include