pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Update to SVN r. 333732



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Jun 1 11:52:48 2018 +0200
Changeset:	1e94e2921391c415f908c7c08add277c9e0a8a00

Modified Files:
	compiler-rt-netbsd/Makefile
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.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.cc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h

Log Message:
compiler-rt-netbsd: Update to SVN r. 333732

Rediff local patches.

Drop kvm(3) interceptors.

This is an intermediate commit.

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=1e94e2921391c415f908c7c08add277c9e0a8a00

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

diffstat:
 compiler-rt-netbsd/Makefile                        |   2 +-
 compiler-rt-netbsd/distinfo                        |   8 +-
 ...zer__common_sanitizer__common__interceptors.inc | 333 +--------------------
 ...zer__common_sanitizer__platform__interceptors.h |   5 +-
 ...__common_sanitizer__platform__limits__netbsd.cc |  10 -
 ...r__common_sanitizer__platform__limits__netbsd.h |  56 +---
 6 files changed, 13 insertions(+), 401 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index 2b8fc245f6..cb1a143b2e 100644
--- a/compiler-rt-netbsd/Makefile
+++ b/compiler-rt-netbsd/Makefile
@@ -5,7 +5,7 @@ CATEGORIES=	lang devel
 
 SVN_REPOSITORIES=		compiler-rt
 SVN_REPO.compiler-rt=		http://llvm.org/svn/llvm-project/compiler-rt/trunk
-SVN_REVISION.compiler-rt=	332792
+SVN_REVISION.compiler-rt=	333732
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	http://compiler-rt.llvm.org/
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 41f336bc64..3d750c85f2 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -7,12 +7,12 @@ SHA1 (patch-lib_fuzzer_FuzzerLoop.cpp) = f658549bdb9b0b875b55e286a0e4df0dd904611
 SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 0e559ebb791942cba9c83f3098d7752f91e1f187
 SHA1 (patch-lib_msan_msan__interceptors.cc) = 79bfe137923597d79bb467d0f282d57221079a85
 SHA1 (patch-lib_msan_msan__linux.cc) = 6fd2ada4a84d1e1cc47ec8f4e1f0608861c73c1a
-SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = a89e76e65e7aa735e4f796505917b4993ccc2662
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = e1d8ad46afc9bec97b7f0e00d0edf5ee377772b7
 SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 91f645a6652d895e97b0aefbb62d80e680cd2c39
 SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = e4c889d8c140b06cb62429b37d56eca88feaaf03
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = d385bfc1df8e6e8bec28f29dc7b9ee403a8101f5
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 0a5d94fff8dfe8cf62bcf2e269e33d52f8ac5137
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = a5036c0da703ad178daded1994008756dcc99cf1
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = dbe5aee67312a9042299cd3bd14d25fa68860fb2
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = f242e307950755010305b004b4c2e21c528114fb
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = a5f5898534bd3c66a0fa9086781bd0124fe43281
 SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__bsd.cc) = 8b629840ff7f56c670d322a9dbbdf7e33ce90cb5
 SHA1 (patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc) = e520ec1e0fefb3cf9fb1d872ebf81952599a6c49
 SHA1 (patch-lib_scudo_scudo__platform.h) = 119d7ad8f8ca9d3e846dbdd7f805ca771e30e410
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 d714aaff8c..ac63cba596 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
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-04-25 21:13:40.000000000 +0000
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-06-01 09:36:54.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_common_interceptors.inc
 @@ -77,6 +77,11 @@
  #define ctime __ctime50
@@ -14,332 +14,10 @@ $NetBSD$
  #define getitimer __getitimer50
  #define getpwent __getpwent50
  #define getpwnam __getpwnam50
-@@ -7161,6 +7166,625 @@ INTERCEPTOR(struct __sanitizer_netent *,
+@@ -7190,6 +7195,303 @@ INTERCEPTOR(struct __sanitizer_netent *,
  #define INIT_NETENT
  #endif
  
-+#if SANITIZER_INTERCEPT_KVM
-+INTERCEPTOR(int, kvm_close, struct __sanitizer_kvm *kd) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_close, kd);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return REAL(kvm_close)(kd);
-+}
-+
-+INTERCEPTOR(int, kvm_dump_header, struct __sanitizer_kvm *kd,
-+            bool (*write_buf)(void*, void*, uptr), void *cookie, int dumpsize) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_dump_header, kd, write_buf, cookie,
-+                           dumpsize);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return REAL(kvm_dump_header)(kd, write_buf, cookie, dumpsize);
-+}
-+
-+INTERCEPTOR(int, kvm_dump_inval, struct __sanitizer_kvm *kd) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_dump_inval, kd);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return REAL(kvm_dump_inval)(kd);
-+}
-+
-+INTERCEPTOR(int, kvm_dump_mkheader, struct __sanitizer_kvm *kd,
-+            OFF_T dump_off) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_dump_mkheader, kd, dump_off);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return REAL(kvm_dump_mkheader)(kd, dump_off);
-+}
-+
-+INTERCEPTOR(int, kvm_dump_wrtheader, struct __sanitizer_kvm *kd,
-+            __sanitizer_FILE *fp, int dumpsize) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_dump_wrtheader, kd, fp, dumpsize);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return REAL(kvm_dump_wrtheader)(kd, fp, dumpsize);
-+}
-+
-+INTERCEPTOR(char **, kvm_getargv, struct __sanitizer_kvm *kd, void *kp,
-+            int nchr) {
-+  void *ctx;
-+  char **argv;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getargv, kd, kp, nchr);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  if (kp)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kp, struct_kinfo_proc_sz);
-+  argv = REAL(kvm_getargv)(kd, kp, nchr);
-+  if (argv) {
-+    char **p = argv;
-+    while (*p) {
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(char **));
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *p, REAL(strlen)(*p) + 1);
-+      p++;
-+    }
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(char **));
-+  }
-+  return argv;
-+}
-+
-+INTERCEPTOR(char **, kvm_getargv2, struct __sanitizer_kvm *kd, void *kp,
-+            int nchr) {
-+  void *ctx;
-+  char **argv;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getargv2, kd, kp, nchr);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  if (kp)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kp, struct_kinfo_proc2_sz);
-+  argv = REAL(kvm_getargv2)(kd, kp, nchr);
-+  if (argv) {
-+    char **p = argv;
-+    while (*p) {
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(char **));
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *p, REAL(strlen)(*p) + 1);
-+      p++;
-+    }
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(char **));
-+  }
-+  return argv;
-+}
-+
-+INTERCEPTOR(char **, kvm_getenvv, struct __sanitizer_kvm *kd, void *kp,
-+            int nchr) {
-+  void *ctx;
-+  char **argv;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getenvv, kd, kp, nchr);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  if (kp)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kp, struct_kinfo_proc_sz);
-+  argv = REAL(kvm_getenvv)(kd, kp, nchr);
-+  if (argv) {
-+    char **p = argv;
-+    while (*p) {
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(char **));
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *p, REAL(strlen)(*p) + 1);
-+      p++;
-+    }
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(char **));
-+  }
-+  return argv;
-+}
-+
-+INTERCEPTOR(char **, kvm_getenvv2, struct __sanitizer_kvm *kd, void *kp,
-+            int nchr) {
-+  void *ctx;
-+  char **argv;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getenvv2, kd, kp, nchr);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  if (kp)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kp, struct_kinfo_proc2_sz);
-+  argv = REAL(kvm_getenvv2)(kd, kp, nchr);
-+  if (argv) {
-+    char **p = argv;
-+    while (*p) {
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(char **));
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *p, REAL(strlen)(*p) + 1);
-+      p++;
-+    }
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p, sizeof(char **));
-+  }
-+  return argv;
-+}
-+
-+INTERCEPTOR(char *, kvm_geterr, struct __sanitizer_kvm *kd) {
-+  void *ctx;
-+  char *res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_geterr, kd);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  res = REAL(kvm_geterr)(kd);
-+  if (res)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, REAL(strlen)(res) + 1);
-+  return res;
-+}
-+
-+INTERCEPTOR(int, kvm_getloadavg, struct __sanitizer_kvm *kd, double loadavg[],
-+            int nelem) {
-+  void *ctx;
-+  int res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getloadavg, kd, loadavg, nelem);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  res = REAL(kvm_getloadavg)(kd, loadavg, nelem);
-+  if (res > 0)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, loadavg, res * sizeof(*loadavg));
-+  return res;
-+}
-+
-+INTERCEPTOR(char *, kvm_getfiles, struct __sanitizer_kvm *kd, int op, int arg,
-+            int *cnt) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getfiles, kd, op, arg, cnt);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return REAL(kvm_getfiles)(kd, op, arg, cnt);
-+}
-+
-+INTERCEPTOR(char *, kvm_getkernelname, struct __sanitizer_kvm *kd) {
-+  void *ctx;
-+  char *name;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getkernelname, kd);
-+  name = REAL(kvm_getkernelname)(kd);
-+  if (name)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, name, REAL(strlen)(name) + 1);
-+  return name;
-+}
-+
-+INTERCEPTOR(void *, kvm_getlwps, struct __sanitizer_kvm *kd, int pid,
-+            unsigned long paddr, uptr esize, int *cnt) {
-+  void *ctx;
-+  void *res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getlwps, kd, pid, paddr, esize, cnt);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  res = REAL(kvm_getlwps)(kd, pid, paddr, esize, cnt);
-+  if (res) {
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, cnt, sizeof(int));
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, esize * (*cnt));
-+  }
-+  return res;
-+}
-+
-+INTERCEPTOR(void *, kvm_getproc2, struct __sanitizer_kvm *kd, int op, int arg,
-+            uptr esize, int *cnt) {
-+  void *ctx;
-+  void *res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getproc2, kd, op, arg, esize, cnt);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  res = REAL(kvm_getproc2)(kd, op, arg, esize, cnt);
-+  if (res) {
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, cnt, sizeof(int));
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, esize * (*cnt));
-+  }
-+  return res;
-+}
-+
-+INTERCEPTOR(void *, kvm_getprocs, struct __sanitizer_kvm *kd, int op, int arg,
-+            int *cnt) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getprocs, kd, op, arg, cnt);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return REAL(kvm_getprocs)(kd, op, arg, cnt);
-+}
-+
-+INTERCEPTOR(int, kvm_nlist, struct __sanitizer_kvm *kd, void *nl) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_nlist, kd, nl);
-+  if (kd)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return REAL(kvm_nlist)(kd, nl);
-+}
-+
-+INTERCEPTOR(struct __sanitizer_kvm *, kvm_open, char *uf, char *mf, char *sf,
-+            int flag, char *program) {
-+  void *ctx;
-+  struct __sanitizer_kvm *kd;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_open, uf, mf, sf, flag, program);
-+  if (uf)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, uf, REAL(strlen)(uf) + 1);
-+  if (mf)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, mf, REAL(strlen)(mf) + 1);
-+  if (sf)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, sf, REAL(strlen)(sf) + 1);
-+  if (program)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, program, REAL(strlen)(program) + 1);
-+  kd = REAL(kvm_open)(uf, mf, sf, flag, program);
-+  if (kd)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  return kd;
-+}
-+
-+INTERCEPTOR(struct __sanitizer_kvm *, kvm_openfiles, char *uf, char *mf,
-+            char *sf, int flag, char *errout) {
-+  void *ctx;
-+  struct __sanitizer_kvm *kd;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_openfiles, uf, mf, sf, flag, errout);
-+  if (uf)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, uf, REAL(strlen)(uf) + 1);
-+  if (mf)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, mf, REAL(strlen)(mf) + 1);
-+  if (sf)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, sf, REAL(strlen)(sf) + 1);
-+  kd = REAL(kvm_openfiles)(uf, mf, sf, flag, errout);
-+  if (kd)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, kd, sizeof(struct __sanitizer_kvm));
-+  if (!kd && errout)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, errout, REAL(strlen)(errout) + 1);
-+  return kd;
-+}
-+
-+INTERCEPTOR(uptr, kvm_read, struct __sanitizer_kvm *kd, unsigned long kva,
-+            void *buf, uptr len) {
-+  void *ctx;
-+  uptr res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_read, kd, kva, buf, len);
-+  res = REAL(kvm_read)(kd, kva, buf, len);
-+  if (res)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, res);
-+  return res;
-+}
-+
-+INTERCEPTOR(uptr, kvm_uread, struct __sanitizer_kvm *kd, unsigned long uva,
-+            void *buf, uptr len) {
-+  void *ctx;
-+  uptr res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_uread, kd, uva, buf, len);
-+  res = REAL(kvm_uread)(kd, uva, buf, len);
-+  if (res)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, res);
-+  return res;
-+}
-+
-+INTERCEPTOR(uptr, kvm_write, struct __sanitizer_kvm *kd, unsigned long kva,
-+            void *buf, uptr len) {
-+  void *ctx;
-+  uptr res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, kvm_write, kd, kva, buf, len);
-+  res = REAL(kvm_uread)(kd, kva, buf, len);
-+  if (buf && res > 0)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, buf, res);
-+  return res;
-+}
-+
-+#define INIT_KVM \
-+  COMMON_INTERCEPT_FUNCTION(kvm_close); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_dump_header); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_dump_inval); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_dump_mkheader); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_dump_wrtheader); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getargv); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getargv2); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getenvv); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getenvv2); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_geterr); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getfiles); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getkernelname); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getloadavg); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getlwps); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getproc2); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_getprocs); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_nlist); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_open); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_openfiles); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_read); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_uread); \
-+  COMMON_INTERCEPT_FUNCTION(kvm_write);
-+#else
-+#define INIT_KVM
-+#endif
-+
 +#if SANITIZER_INTERCEPT_SYSCTL
 +INTERCEPTOR(int, sysctl, int *name, unsigned int namelen, void *oldp,
 +            SIZE_T *oldlenp, void *newp, SIZE_T newlen) {
@@ -640,15 +318,14 @@ $NetBSD$
  static void InitializeCommonInterceptors() {
    static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
    interceptor_metadata_map = new((void *)&metadata_mem) MetadataHashMap();
-@@ -7402,6 +8026,11 @@ static void InitializeCommonInterceptors
+@@ -7436,6 +7738,10 @@ static void InitializeCommonInterceptors
    INIT_TTYENT;
    INIT_PROTOENT;
    INIT_NETENT;
-+  INIT_KVM;
 +  INIT_SYSCTL;
 +  INIT_ATOF;
 +  INIT_FTS;
 +  INIT_REGEX;
  
- #if SANITIZER_NETBSD
-   COMMON_INTERCEPT_FUNCTION(__libc_mutex_lock);
+   INIT___PRINTF_CHK;
+ }
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 92517ba9f0..8fce680db1 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
@@ -1,12 +1,11 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-05-10 23:16:36.443785252 +0000
+--- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-06-01 09:36:54.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_platform_interceptors.h
-@@ -496,4 +496,10 @@
+@@ -498,4 +498,9 @@
  #define SANITIZER_INTERCEPT_PROTOENT SI_NETBSD
  #define SANITIZER_INTERCEPT_NETENT SI_NETBSD
  
-+#define SANITIZER_INTERCEPT_KVM SI_NETBSD
 +#define SANITIZER_INTERCEPT_SYSCTL SI_NETBSD
 +#define SANITIZER_INTERCEPT_ATOF SI_NETBSD
 +#define SANITIZER_INTERCEPT_FTS SI_NETBSD
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
index 8d60bc2cf7..aeb788a548 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
@@ -48,13 +48,3 @@ $NetBSD$
  unsigned struct_utimbuf_sz = sizeof(struct utimbuf);
  unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
  unsigned struct_timex_sz = sizeof(struct timex);
-@@ -339,6 +352,9 @@ unsigned path_max = PATH_MAX;
- 
- int struct_ttyent_sz = sizeof(struct ttyent);
- 
-+int struct_kinfo_proc_sz = sizeof(struct kinfo_proc);
-+int struct_kinfo_proc2_sz = sizeof(struct kinfo_proc2);
-+
- // ioctl arguments
- unsigned struct_altqreq_sz = sizeof(altqreq);
- unsigned struct_amr_user_ioctl_sz = sizeof(amr_user_ioctl);
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 2b3fe36bd0..fae45776eb 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
@@ -18,17 +18,7 @@ $NetBSD$
  
  union __sanitizer_sigval {
    int sival_int;
-@@ -377,6 +386,9 @@ extern unsigned path_max;
- 
- extern int struct_ttyent_sz;
- 
-+extern int struct_kinfo_proc_sz;
-+extern int struct_kinfo_proc2_sz;
-+
- extern int ptrace_pt_io;
- extern int ptrace_pt_lwpinfo;
- extern int ptrace_pt_set_event_mask;
-@@ -396,6 +408,7 @@ extern int ptrace_pt_getfpregs;
+@@ -396,6 +405,7 @@ extern int ptrace_pt_getfpregs;
  extern int ptrace_pt_setdbregs;
  extern int ptrace_pt_getdbregs;
  
@@ -36,47 +26,3 @@ $NetBSD$
  struct __sanitizer_ptrace_io_desc {
    int piod_op;
    void *piod_offs;
-@@ -460,6 +473,43 @@ struct __sanitizer_ttyent {
-   char *ty_class;
- };
- 
-+
-+struct __sanitizer_kvm {
-+  const char *program;
-+  char *errp;
-+  char errbuf[2048]; // _POSIX2_LINE_MAX
-+  int pmfd;
-+  int vmfd;
-+  int swfd;
-+  int nlfd;
-+  char alive;
-+  void *procbase;
-+  void *procbase2;
-+  void *lwpbase;
-+  uptr procbase_len;
-+  uptr procbase2_len;
-+  uptr lwpbase_len;
-+  unsigned long usrstack;
-+  unsigned long min_uva, max_uva;
-+  int nbpg;
-+  char *swapspc;
-+  char *argspc, *argbuf;
-+  uptr argspc_len;
-+  char **argv;
-+  int argc;
-+  void *kcore_hdr;
-+  uptr cpu_dsize;
-+  void *cpu_data;
-+  u64 dump_off;
-+  void *vmst;
-+  void *vm_page_buckets;
-+  int vm_page_hash_mask;
-+  uptr fdalign;
-+  void *iobuf;
-+  uptr iobufsz;
-+  char kernelname[1024];
-+};
-+
- #define IOC_NRBITS 8
- #define IOC_TYPEBITS 8
- #define IOC_SIZEBITS 14


Home | Main Index | Thread Index | Old Index