pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

compiler-rt-netbsd: Sync with local patches



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Jan 23 00:13:46 2018 +0100
Changeset:	8fca517018cbdb6983e7114a186f9f404d49f762

Modified Files:
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_paccept.cc
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcat.cc
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcpy.cc
	compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
	compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk

Log Message:
compiler-rt-netbsd: Sync with local patches

Changes:
1. Improve sysctl-like functions handling in interceptors
2. Implement interceptors for getprotoent(3)-like functions

netstat(1) can now execute under MSan.

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8fca517018cbdb6983e7114a186f9f404d49f762

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 compiler-rt-netbsd/distinfo                        |  26 +--
 ...atch-include_sanitizer_netbsd__syscall__hooks.h |   2 +-
 ...zer__common_sanitizer__common__interceptors.inc | 180 +++++++++++++++++++--
 ...mmon_sanitizer__netbsd__interceptors__ioctl.inc |   2 +-
 ...nitizer__common_sanitizer__netbsd__syscalls.inc |   2 +-
 ...zer__common_sanitizer__platform__interceptors.h |   3 +-
 ...r__common_sanitizer__platform__limits__netbsd.h |  27 +++-
 ...sanitizer__common_TestCases_NetBSD_kvm__open.cc |   2 +-
 ...izer__common_TestCases_NetBSD_kvm__openfiles.cc |   2 +-
 ...t_sanitizer__common_TestCases_NetBSD_paccept.cc |   2 +-
 ...t_sanitizer__common_TestCases_NetBSD_strlcat.cc |   2 +-
 ...t_sanitizer__common_TestCases_NetBSD_strlcpy.cc |   2 +-
 .../patch-utils_generate__netbsd__ioctls.awk       |   2 +-
 .../patch-utils_generate__netbsd__syscalls.awk     |   2 +-
 14 files changed, 210 insertions(+), 46 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index d57f683633..b8fd9c8918 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -2,7 +2,7 @@ $NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
 
 SHA1 (patch-cmake_config-ix.cmake) = 11195c8254c84d5972a2ffee8a9e66758ab7105b
 SHA1 (patch-include_CMakeLists.txt) = b6f2713b7e5337aed542442936b6f747efe0a607
-SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 62a6b2c06067015626bd78995160a073234e5dd8
+SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = b2166de9a80f37cb09a569d73fd23e298e0ab9a6
 SHA1 (patch-lib_asan_asan__interceptors.cc) = ea4005ce02775060ff52af76d568c450892067b5
 SHA1 (patch-lib_esan_esan__interceptors.cpp) = a7103ca053e92a810c87c593262bb386f3d02606
 SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = bed69bc433f70ec4d88fc5aa11d47ffbd18f4b74
@@ -10,25 +10,25 @@ SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = c49ab3759728bbd3e27580a3d0d3e2
 SHA1 (patch-lib_msan_msan__interceptors.cc) = 42f9f0416e1b30f15fb0f104d70d4b0ead83519f
 SHA1 (patch-lib_msan_msan__linux.cc) = d75d7587071a9e7a3f6a08a3008af55319e62cab
 SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = fcbf2987ccab5258fe760aef6ef47bd97e0e0b2c
-SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = b36bbc916336f09d5176239714501e5d1208a5d0
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 796ff484686594e426d45bac5b4c736811aa090c
 SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors__ioctl.inc) = 231f519a0564aa69d746a7f0bbee1b1aeed927a7
 SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 2ff74de8be0825ca4162969cb2ed367654934a17
 SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = b1057f01ae2f03498613eb1a02501c8a65d16fed
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = 2ac600e005856bd880a36b64726c169a25ae849d
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 189a180e443874590dc3056c2281f295e88373ca
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 8b11b1732a0ec455fd871805d3a92f6891c0dfaa
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = 501876c2593058c94e443dc1c6bddfc86a7b989a
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 47b0815e355eba0b3c6b5e56c35568a435c8d7a6
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = e5d15e59469e927344fb4bb956d8ec350cb9454e
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 47236661e37673d66a52e80c3f55be13029014ca
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 2441d51ba207b067a52b7688076335bb38ad0bb9
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = f4bd9da33ad0f9702b80d99d49451ca7f15ee2b7
 SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc) = 7e0deaeeada33bd13575251e5d8fb4a0ee4c53e8
 SHA1 (patch-lib_scudo_scudo__platform.h) = d44bd094136dd0381db87344fbbcad1dcfd44dc1
 SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = 4fbaa64e3f8d28cdbab6783c296dfd31cecb45a5
 SHA1 (patch-test_asan_lit.cfg) = becbc3c8c9cfd589e1dcbf1014dd4655f952c144
 SHA1 (patch-test_lsan_lit.common.cfg) = 10dc251f80efb96d015a22c740dc20b1843b9a11
-SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc) = ef0eff694a3b00da7efa4ce46cc9bce69c44cef7
-SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc) = 5a33bc8016db53c949ad2d19417377deeb894ffa
-SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_paccept.cc) = aecb903ded17b032a7390452e0874d769b30260d
-SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_strlcat.cc) = 07aed0bc75019f523afa44d8ed456e4884e776d2
-SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_strlcpy.cc) = f1f99916bd7ab6e137aabdd8d508bb099fd9549c
+SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc) = 673fd069eb26f82701cb241f32cee158c56a98ae
+SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc) = 09b07f5fcf0e88a9879500433ce808250459d866
+SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_paccept.cc) = 677b018626ec40b7fcddf5420db4926d8da38af0
+SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_strlcat.cc) = ffce89f5a6f8025e7cbf0df200a3e9ba2f61be53
+SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_strlcpy.cc) = 8ef92e665a3505ca992ec0202ae228442a6f0896
 SHA1 (patch-test_scudo_lit.cfg) = 111a66513b994534bb0d69d214b7e0cb4e2b8eb8
-SHA1 (patch-utils_generate__netbsd__ioctls.awk) = de4516f09e9deaa7287b555a07b844dcd29fcb14
-SHA1 (patch-utils_generate__netbsd__syscalls.awk) = d6f277ca8ef4307dafea5e79784d16ac0aa413bd
+SHA1 (patch-utils_generate__netbsd__ioctls.awk) = d3b4fa17b08c8bf33ec38af581f945d28a164a1c
+SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 6d503cd725990a9738d45ec4dc33397dc102bf6a
diff --git a/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h b/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
index 204e41f0c7..28a90c1129 100644
--- a/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
+++ b/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- include/sanitizer/netbsd_syscall_hooks.h.orig	2018-01-22 13:13:52.868772892 +0000
+--- include/sanitizer/netbsd_syscall_hooks.h.orig	2018-01-22 23:12:45.617372317 +0000
 +++ include/sanitizer/netbsd_syscall_hooks.h
 @@ -0,0 +1,4730 @@
 +//===-- netbsd_syscall_hooks.h --------------------------------------------===//
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
index 83fe9e981e..488dd0fff9 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
@@ -166,7 +166,7 @@ $NetBSD$
    return res;
  }
  
-@@ -6608,6 +6658,518 @@ INTERCEPTOR(int, getgroupmembership, con
+@@ -6608,6 +6658,667 @@ INTERCEPTOR(int, getgroupmembership, con
  #define INIT_GETGROUPLIST
  #endif
  
@@ -522,41 +522,108 @@ $NetBSD$
 +
 +#if SANITIZER_INTERCEPT_SYSCTL
 +INTERCEPTOR(int, sysctl, int *name, unsigned int namelen, void *oldp,
-+            uptr *oldlenp, void *newp, uptr newlen) {
++            SIZE_T *oldlenp, void *newp, SIZE_T newlen) {
 +  void *ctx;
 +  int res;
 +  COMMON_INTERCEPTOR_ENTER(ctx, sysctl, name, namelen, oldp, oldlenp, newp,
 +                           newlen);
-+  if (name) {
++  if (name)
 +    COMMON_INTERCEPTOR_READ_RANGE(ctx, name, namelen * sizeof(*name));
-+  }
-+  if (newp) {
++  if (newp)
 +    COMMON_INTERCEPTOR_READ_RANGE(ctx, newp, newlen);
-+  }
 +  res = REAL(sysctl)(name, namelen, oldp, oldlenp, newp, newlen);
-+  if (!res)
++  if (!res && oldp && oldlenp) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, oldlenp, sizeof(*oldlenp));
 +    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, oldp, *oldlenp);
++  }
 +  return res;
 +}
 +
-+INTERCEPTOR(int, sysctlbyname, char *sname, void *oldp, uptr *oldlenp,
-+            void *newp, uptr newlen) {
++INTERCEPTOR(int, sysctlbyname, char *sname, void *oldp, SIZE_T *oldlenp,
++            void *newp, SIZE_T newlen) {
 +  void *ctx;
 +  int res;
 +  COMMON_INTERCEPTOR_ENTER(ctx, sysctlbyname, sname, oldp, oldlenp, newp,
 +                           newlen);
-+  if (sname) {
++  if (sname)
 +    COMMON_INTERCEPTOR_READ_RANGE(ctx, sname, REAL(strlen)(sname) + 1);
-+  }
 +  res = REAL(sysctlbyname)(sname, oldp, oldlenp, newp, newlen);
-+  if (!res)
++  if (!res) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, oldlenp, sizeof(*oldlenp));
 +    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, oldp, *oldlenp);
++  }
++  return res;
++}
++
++INTERCEPTOR(int, sysctlgetmibinfo, char *sname, int *name, unsigned int *namelenp,
++            char *cname, SIZE_T *csz, void **rnode, int v) {
++  void *ctx;
++  int res;
++  COMMON_INTERCEPTOR_ENTER(ctx, sysctlgetmibinfo, sname, name, namelenp, cname, csz, rnode, v);
++  if (sname)
++    COMMON_INTERCEPTOR_READ_RANGE(ctx, sname, REAL(strlen)(sname) + 1);
++  // Skip rnode, it's rarely used and not trivial to sanitize
++  // It's also used mostly internally
++  res = REAL(sysctlgetmibinfo)(sname, name, namelenp, cname, csz, rnode, v);
++  if (!res) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, namelenp, sizeof(*namelenp));
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, name, *namelenp);
++  }
++  if (cname && csz) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, csz, sizeof(*csz));
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, cname, *csz);
++  }
++  return res;
++}
++
++INTERCEPTOR(int, sysctlnametomib, const char *sname, int *name, SIZE_T *namelenp) {
++  void *ctx;
++  int res;
++  COMMON_INTERCEPTOR_ENTER(ctx, sysctlnametomib, sname, name, namelenp);
++  if (sname)
++    COMMON_INTERCEPTOR_READ_RANGE(ctx, sname, REAL(strlen)(sname) + 1);
++  res = REAL(sysctlnametomib)(sname, name, namelenp);
++  if (!res) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, namelenp, sizeof(*namelenp));
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, name, *namelenp);
++  }
 +  return res;
 +}
 +
++INTERCEPTOR(void *, asysctl, const int *name, SIZE_T namelen, SIZE_T *len) {
++  void *ctx;
++  void *res;
++  COMMON_INTERCEPTOR_ENTER(ctx, asysctl, name, namelen, len);
++  if (name)
++    COMMON_INTERCEPTOR_READ_RANGE(ctx, name, sizeof(*name) * namelen);
++  res = REAL(asysctl)(name, namelen, len);
++  if (res && len) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, len, sizeof(*len));
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, *len);
++  }
++  return res;
++}
++
++INTERCEPTOR(void *, asysctlbyname, const char *sname, SIZE_T *len) {
++  void *ctx;
++  void *res;
++  COMMON_INTERCEPTOR_ENTER(ctx, asysctlbyname, sname, len);
++  if (sname)
++    COMMON_INTERCEPTOR_READ_RANGE(ctx, sname, REAL(strlen)(sname) + 1);
++  res = REAL(asysctlbyname)(sname, len);
++  if (res && len) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, len, sizeof(*len));
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, *len);
++  }
++  return res;
++}
 +#define INIT_SYSCTL \
 +  COMMON_INTERCEPT_FUNCTION(sysctl); \
-+  COMMON_INTERCEPT_FUNCTION(sysctlbyname)
++  COMMON_INTERCEPT_FUNCTION(sysctlbyname); \
++  COMMON_INTERCEPT_FUNCTION(sysctlgetmibinfo); \
++  COMMON_INTERCEPT_FUNCTION(sysctlnametomib); \
++  COMMON_INTERCEPT_FUNCTION(asysctl); \
++  COMMON_INTERCEPT_FUNCTION(asysctlbyname);
 +#else
 +#define INIT_SYSCTL
 +#endif
@@ -681,11 +748,93 @@ $NetBSD$
 +#else
 +#define INIT_FGETLN
 +#endif
++
++#if SANITIZER_INTERCEPT_GETPROTOENT
++INTERCEPTOR(struct __sanitizer_protoent *, getprotoent) {
++  void *ctx;
++  struct __sanitizer_protoent *p;
++  COMMON_INTERCEPTOR_ENTER(ctx, getprotoent);
++  p = REAL(getprotoent)();
++  if (p) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(*p));
++
++    char **pp = p->p_aliases;
++
++    while (*pp) {
++       COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pp, sizeof(char **));
++       COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *pp, REAL(strlen)(*pp) + 1);
++       pp++;
++    }
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pp, sizeof(char **));
++  }
++  return p;
++}
++
++INTERCEPTOR(struct __sanitizer_protoent *, getprotobyname, const char *name) {
++  void *ctx;
++  struct __sanitizer_protoent *p;
++  COMMON_INTERCEPTOR_ENTER(ctx, getprotobyname, name);
++  p = REAL(getprotobyname)(name);
++  if (p) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(*p));
++
++    char **pp = p->p_aliases;
++
++    while (*pp) {
++       COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pp, sizeof(char **));
++       COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *pp, REAL(strlen)(*pp) + 1);
++       pp++;
++    }
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pp, sizeof(char **));
++  }
++  return p;
++}
++
++INTERCEPTOR(struct __sanitizer_protoent *, getprotobynumber, int proto) {
++  void *ctx;
++  struct __sanitizer_protoent *p;
++  COMMON_INTERCEPTOR_ENTER(ctx, getprotobynumber, proto);
++  p = REAL(getprotobynumber)(proto);
++  if (p) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(*p));
++
++    char **pp = p->p_aliases;
++
++    while (*pp) {
++       COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pp, sizeof(char **));
++       COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *pp, REAL(strlen)(*pp) + 1);
++       pp++;
++    }
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pp, sizeof(char **));
++  }
++  return p;
++}
++
++INTERCEPTOR(void, setprotoent, int stayopen) {
++  void *ctx;
++  COMMON_INTERCEPTOR_ENTER(ctx, setprotoent, stayopen);
++  return REAL(setprotoent)(stayopen);
++}
++
++INTERCEPTOR(void, endprotoent) {
++  void *ctx;
++  COMMON_INTERCEPTOR_ENTER(ctx, endprotoent);
++  return REAL(endprotoent)();
++}
++#define INIT_GETPROTOENT \
++  COMMON_INTERCEPT_FUNCTION(getprotoent); \
++  COMMON_INTERCEPT_FUNCTION(getprotobyname); \
++  COMMON_INTERCEPT_FUNCTION(getprotobynumber); \
++  COMMON_INTERCEPT_FUNCTION(setprotoent); \
++  COMMON_INTERCEPT_FUNCTION(endprotoent);
++#else
++#define INIT_GETPROTOENT
++#endif
 +
  static void InitializeCommonInterceptors() {
    static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
    interceptor_metadata_map = new((void *)&metadata_mem) MetadataHashMap();
-@@ -6687,6 +7249,7 @@ static void InitializeCommonInterceptors
+@@ -6687,6 +7398,7 @@ static void InitializeCommonInterceptors
    INIT_GETSOCKOPT;
    INIT_ACCEPT;
    INIT_ACCEPT4;
@@ -693,7 +842,7 @@ $NetBSD$
    INIT_MODF;
    INIT_RECVMSG;
    INIT_SENDMSG;
-@@ -6827,6 +7390,13 @@ static void InitializeCommonInterceptors
+@@ -6827,6 +7539,14 @@ static void InitializeCommonInterceptors
    INIT_ACCESS;
    INIT_FACCESSAT;
    INIT_GETGROUPLIST;
@@ -704,6 +853,7 @@ $NetBSD$
 +  INIT_ATOF;
 +  INIT_GETTTYENT;
 +  INIT_FGETLN;
++  INIT_GETPROTOENT;
  
  #if SANITIZER_NETBSD
    COMMON_INTERCEPT_FUNCTION(__libc_mutex_lock);
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
index 540c935a7b..44a281f64c 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc.orig	2018-01-22 13:13:52.871549138 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc.orig	2018-01-22 23:12:45.620394449 +0000
 +++ lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc
 @@ -0,0 +1,1490 @@
 +//===-- sanitizer_common_interceptors_ioctl.inc -----------------*- C++ -*-===//
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
index f95d3f2541..b5fa0ee0cd 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig	2018-01-22 13:13:52.872380218 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig	2018-01-22 23:12:45.621254703 +0000
 +++ lib/sanitizer_common/sanitizer_netbsd_syscalls.inc
 @@ -0,0 +1,3793 @@
 +//===-- sanitizer_common_syscalls.inc ---------------------------*- C++ -*-===//
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
index 289661485b..911702e483 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
@@ -10,7 +10,7 @@ $NetBSD$
  #define SANITIZER_INTERCEPT_MODF SI_POSIX
  #define SANITIZER_INTERCEPT_RECVMSG SI_POSIX
  #define SANITIZER_INTERCEPT_SENDMSG SI_POSIX
-@@ -440,5 +441,12 @@
+@@ -440,5 +441,13 @@
  #define SANITIZER_INTERCEPT_ACCESS SI_NETBSD
  #define SANITIZER_INTERCEPT_FACCESSAT SI_NETBSD
  #define SANITIZER_INTERCEPT_GETGROUPLIST SI_NETBSD
@@ -21,5 +21,6 @@ $NetBSD$
 +#define SANITIZER_INTERCEPT_ATOF SI_NETBSD
 +#define SANITIZER_INTERCEPT_GETTTYENT SI_NETBSD
 +#define SANITIZER_INTERCEPT_FGETLN SI_NETBSD
++#define SANITIZER_INTERCEPT_GETPROTOENT SI_NETBSD
  
  #endif  // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
index e7d600cb68..6bdca6f7db 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
@@ -60,7 +60,20 @@ $NetBSD$
  struct __sanitizer_sem_t {
    uptr data[5];
  };
-@@ -131,6 +134,8 @@ struct __sanitizer_ifaddrs {
+@@ -110,6 +113,12 @@ struct __sanitizer_shmid_ds {
+   void *_shm_internal;
+ };
+ 
++struct __sanitizer_protoent {
++  char *p_name;
++  char **p_aliases;
++  int p_proto;
++};
++
+ extern unsigned struct_msqid_ds_sz;
+ extern unsigned struct_mq_attr_sz;
+ extern unsigned struct_timex_sz;
+@@ -131,6 +140,8 @@ struct __sanitizer_ifaddrs {
    unsigned int ifa_addrflags;
  };
  
@@ -69,7 +82,7 @@ $NetBSD$
  typedef unsigned __sanitizer_pthread_key_t;
  
  typedef long long __sanitizer_time_t;
-@@ -200,6 +205,12 @@ struct __sanitizer_msghdr {
+@@ -200,6 +211,12 @@ struct __sanitizer_msghdr {
    unsigned msg_controllen;
    int msg_flags;
  };
@@ -82,7 +95,7 @@ $NetBSD$
  struct __sanitizer_cmsghdr {
    unsigned cmsg_len;
    int cmsg_level;
-@@ -252,6 +263,22 @@ struct __sanitizer_sigaction {
+@@ -252,6 +269,22 @@ struct __sanitizer_sigaction {
    int sa_flags;
  };
  
@@ -105,7 +118,7 @@ $NetBSD$
  typedef __sanitizer_sigset_t __sanitizer_kernel_sigset_t;
  
  struct __sanitizer_kernel_sigaction_t {
-@@ -309,6 +336,8 @@ struct __sanitizer_pollfd {
+@@ -309,6 +342,8 @@ struct __sanitizer_pollfd {
  
  typedef unsigned __sanitizer_nfds_t;
  
@@ -114,7 +127,7 @@ $NetBSD$
  struct __sanitizer_glob_t {
    uptr gl_pathc;
    uptr gl_matchc;
-@@ -328,6 +357,54 @@ extern int glob_altdirfunc;
+@@ -328,6 +363,54 @@ extern int glob_altdirfunc;
  
  extern unsigned path_max;
  
@@ -169,7 +182,7 @@ $NetBSD$
  struct __sanitizer_wordexp_t {
    uptr we_wordc;
    char **we_wordv;
-@@ -361,6 +438,53 @@ struct __sanitizer_ifconf {
+@@ -361,6 +444,53 @@ struct __sanitizer_ifconf {
    } ifc_ifcu;
  };
  
@@ -223,7 +236,7 @@ $NetBSD$
  #define IOC_NRBITS 8
  #define IOC_TYPEBITS 8
  #define IOC_SIZEBITS 14
-@@ -385,185 +509,1712 @@ struct __sanitizer_ifconf {
+@@ -385,185 +515,1712 @@ struct __sanitizer_ifconf {
  #define IOC_NR(nr) (((nr) >> IOC_NRSHIFT) & IOC_NRMASK)
  #define IOC_SIZE(nr) (((nr) >> IOC_SIZESHIFT) & IOC_SIZEMASK)
  
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc
index aac1f4cef4..57be837ce8 100644
--- a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- test/sanitizer_common/TestCases/NetBSD/kvm_open.cc.orig	2018-01-22 13:13:52.874384543 +0000
+--- test/sanitizer_common/TestCases/NetBSD/kvm_open.cc.orig	2018-01-22 23:12:45.623442152 +0000
 +++ test/sanitizer_common/TestCases/NetBSD/kvm_open.cc
 @@ -0,0 +1,13 @@
 +// RUN: %clangxx -O0 -g %s -o %t && %run %t
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc
index 87131262fa..c53cb82eb8 100644
--- a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- test/sanitizer_common/TestCases/NetBSD/kvm_openfiles.cc.orig	2018-01-22 13:13:52.874459075 +0000
+--- test/sanitizer_common/TestCases/NetBSD/kvm_openfiles.cc.orig	2018-01-22 23:12:45.623530010 +0000
 +++ test/sanitizer_common/TestCases/NetBSD/kvm_openfiles.cc
 @@ -0,0 +1,13 @@
 +// RUN: %clangxx -O0 -g %s -o %t && %run %t
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_paccept.cc b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_paccept.cc
index d4a55ec73e..1c2a53fabf 100644
--- a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_paccept.cc
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_paccept.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- test/sanitizer_common/TestCases/NetBSD/paccept.cc.orig	2018-01-22 13:13:52.874537387 +0000
+--- test/sanitizer_common/TestCases/NetBSD/paccept.cc.orig	2018-01-22 23:12:45.623624921 +0000
 +++ test/sanitizer_common/TestCases/NetBSD/paccept.cc
 @@ -0,0 +1,74 @@
 +// RUN: %clangxx -O0 -g %s -o %t && %run %t
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcat.cc b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcat.cc
index ca1e651c59..268c0f6175 100644
--- a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcat.cc
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcat.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- test/sanitizer_common/TestCases/NetBSD/strlcat.cc.orig	2018-01-22 13:13:52.874611326 +0000
+--- test/sanitizer_common/TestCases/NetBSD/strlcat.cc.orig	2018-01-22 23:12:45.623715166 +0000
 +++ test/sanitizer_common/TestCases/NetBSD/strlcat.cc
 @@ -0,0 +1,56 @@
 +// RUN: %clangxx -O0 -g %s -o %t && %run %t
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcpy.cc b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcpy.cc
index 87c99a45e1..563e41eb28 100644
--- a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcpy.cc
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_strlcpy.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- test/sanitizer_common/TestCases/NetBSD/strlcpy.cc.orig	2018-01-22 13:13:52.874685814 +0000
+--- test/sanitizer_common/TestCases/NetBSD/strlcpy.cc.orig	2018-01-22 23:12:45.623811564 +0000
 +++ test/sanitizer_common/TestCases/NetBSD/strlcpy.cc
 @@ -0,0 +1,56 @@
 +// RUN: %clangxx -O0 -g %s -o %t && %run %t
diff --git a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
index 8b40a335bd..f272ff7e9f 100644
--- a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
+++ b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- utils/generate_netbsd_ioctls.awk.orig	2018-01-22 13:13:52.874970199 +0000
+--- utils/generate_netbsd_ioctls.awk.orig	2018-01-22 23:12:45.624127411 +0000
 +++ utils/generate_netbsd_ioctls.awk
 @@ -0,0 +1,755 @@
 +#!/usr/bin/awk -f
diff --git a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
index bdc513f16b..7e24050e10 100644
--- a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
+++ b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- utils/generate_netbsd_syscalls.awk.orig	2018-01-22 13:13:52.875613329 +0000
+--- utils/generate_netbsd_syscalls.awk.orig	2018-01-22 23:12:45.624782606 +0000
 +++ utils/generate_netbsd_syscalls.awk
 @@ -0,0 +1,2989 @@
 +#!/usr/bin/awk -f


Home | Main Index | Thread Index | Old Index