[PATCH] D56138: [Sanitizer] Enable getfsent api for Darwin
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 28 16:20:59 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT350138: [Sanitizer] Enable getfsent api for Darwin (authored by devnexen, committed by ).
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56138/new/
https://reviews.llvm.org/D56138
Files:
lib/sanitizer_common/sanitizer_platform_interceptors.h
lib/sanitizer_common/sanitizer_platform_limits_posix.cc
lib/sanitizer_common/sanitizer_platform_limits_posix.h
test/sanitizer_common/TestCases/Posix/getfsent.cc
Index: lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -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
Index: lib/sanitizer_common/sanitizer_platform_limits_posix.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -51,6 +51,7 @@
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;
Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -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 @@
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
Index: test/sanitizer_common/TestCases/Posix/getfsent.cc
===================================================================
--- test/sanitizer_common/TestCases/Posix/getfsent.cc
+++ test/sanitizer_common/TestCases/Posix/getfsent.cc
@@ -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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56138.179668.patch
Type: text/x-patch
Size: 2265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181229/4235516f/attachment.bin>
More information about the llvm-commits
mailing list