[compiler-rt] r350138 - [Sanitizer] Enable getfsent api for Darwin
David Carlier via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 28 16:17:22 PST 2018
Author: devnexen
Date: Fri Dec 28 16:17:21 2018
New Revision: 350138
URL: http://llvm.org/viewvc/llvm-project?rev=350138&view=rev
Log:
[Sanitizer] Enable getfsent api for Darwin
Reviewers: vitalybuka, kubamracek
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D56138
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h?rev=350138&r1=350137&r2=350138&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h Fri Dec 28 16:17:21 2018
@@ -545,7 +545,7 @@
#define SANITIZER_INTERCEPT_SHA2 SI_NETBSD
#define SANITIZER_INTERCEPT_CDB SI_NETBSD
#define SANITIZER_INTERCEPT_VIS (SI_NETBSD || SI_FREEBSD)
-#define SANITIZER_INTERCEPT_GETFSENT (SI_FREEBSD || SI_NETBSD)
+#define SANITIZER_INTERCEPT_GETFSENT (SI_FREEBSD || SI_NETBSD || SI_MAC)
#define SANITIZER_INTERCEPT_ARC4RANDOM (SI_FREEBSD || SI_NETBSD)
#endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=350138&r1=350137&r2=350138&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Dec 28 16:17:21 2018
@@ -25,6 +25,7 @@
#endif
#include <arpa/inet.h>
#include <dirent.h>
+#include <fstab.h>
#include <grp.h>
#include <limits.h>
#include <net/if.h>
@@ -192,6 +193,7 @@ namespace __sanitizer {
unsigned struct_sched_param_sz = sizeof(struct sched_param);
unsigned struct_regex_sz = sizeof(regex_t);
unsigned struct_regmatch_sz = sizeof(regmatch_t);
+ unsigned struct_fstab_sz = sizeof(struct fstab);
#if SANITIZER_MAC && !SANITIZER_IOS
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h?rev=350138&r1=350137&r2=350138&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h Fri Dec 28 16:17:21 2018
@@ -51,6 +51,7 @@ namespace __sanitizer {
extern unsigned struct_statfs64_sz;
extern unsigned struct_regex_sz;
extern unsigned struct_regmatch_sz;
+ extern unsigned struct_fstab_sz;
#if !SANITIZER_ANDROID
extern unsigned struct_statfs_sz;
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc?rev=350138&r1=350137&r2=350138&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/getfsent.cc Fri Dec 28 16:17:21 2018
@@ -1,6 +1,6 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
//
-// UNSUPPORTED: linux, darwin, solaris
+// UNSUPPORTED: linux, solaris
#include <assert.h>
#include <errno.h>
More information about the llvm-commits
mailing list