pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Merge local patches with pkgsrc-wip



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Jan 10 04:44:10 2018 +0100
Changeset:	cc1b24e80e7c91206bb266f9c2a118ae9c4a7548

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.cc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
	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: Merge local patches with pkgsrc-wip

Correct more bugs with -lkvm handling.
Add new interceptors for devname(3) and devname_r(3).

An invocation of ps(1) without arguments works now.

$ ./ps
  PID TTY   STAT    TIME COMMAND
   43 pts/0 Ss   0:00.01 -ksh
 4341 pts/0 S+   0:00.01 /usr/bin/less
15332 pts/0 Dl+  0:00.26 git diff .
  860 pts/1 Ss   0:00.03 -ksh
 6349 pts/1 O+   0:00.01 ./ps
  146 pts/2 Is+  0:00.01 -ksh
  633 pts/3 Is+  0:00.01 -ksh
  773 pts/4 Is+  0:00.01 -ksh
 8046 pts/5 Is+  0:00.01 -ksh
 8652 pts/6 I+   0:00.00 /usr/bin/more -s /usr/share/man/cat3/kvm_getargv2.0
14425 pts/6 I+   0:00.00 man kvm_getargv2
15855 pts/6 I+   0:00.00 sh -c /usr/bin/more -s /usr/share/man/cat3/kvm_getargv2.0
18910 pts/6 Is   0:00.00 -ksh
20987 pts/7 Is+  0:00.03 -ksh

There is a broken parsing of arguments.

$ ./ps a
==24568==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x4ac10b in kludge_oldps_options /public/src.git/bin/ps/ps.c:789:3
    #1 0x4a734b in main /public/src.git/bin/ps/ps.c:225:13
    #2 0x41a03a in ___start (/public/src.git/bin/ps/./ps+0x41a03a)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /public/src.git/bin/ps/ps.c:789:3 in kludge_oldps_options
Exiting

A similar msan bug has been observed in other programs.
MSan cannot parse ctype(3) functions correctly inside while().

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=cc1b24e80e7c91206bb266f9c2a118ae9c4a7548

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

diffstat:
 compiler-rt-netbsd/distinfo                        | 18 ++---
 ...atch-include_sanitizer_netbsd__syscall__hooks.h |  2 +-
 ...zer__common_sanitizer__common__interceptors.inc | 77 ++++++++++++++++++++--
 ...mmon_sanitizer__netbsd__interceptors__ioctl.inc |  2 +-
 ...nitizer__common_sanitizer__netbsd__syscalls.inc |  2 +-
 ...zer__common_sanitizer__platform__interceptors.h |  3 +-
 ...__common_sanitizer__platform__limits__netbsd.cc | 23 +++++--
 ...r__common_sanitizer__platform__limits__netbsd.h | 10 ++-
 .../patch-utils_generate__netbsd__ioctls.awk       |  2 +-
 .../patch-utils_generate__netbsd__syscalls.awk     |  2 +-
 10 files changed, 111 insertions(+), 30 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 566e085b0b..135a7a36b7 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) = dfc7a195cb774cc13cb495387781d600e16c82d9
 SHA1 (patch-include_CMakeLists.txt) = b6f2713b7e5337aed542442936b6f747efe0a607
-SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 9b4900e42388d560e75b35a071b35dd75a70fe62
+SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 645b7b91fe674627084fe26efd2ebf7f0fafd447
 SHA1 (patch-lib_asan_asan__interceptors.cc) = ea4005ce02775060ff52af76d568c450892067b5
 SHA1 (patch-lib_esan_esan__interceptors.cpp) = a7103ca053e92a810c87c593262bb386f3d02606
 SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 38ca750154dfc9843a56748078235824b772a147
@@ -10,18 +10,18 @@ SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = 45fd48ae7bb21878432f925dea7af8
 SHA1 (patch-lib_msan_msan__interceptors.cc) = 92ed308e84b0845f15110e0167f265ed5cea2580
 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) = e4ec25bef1effa4649f9989ea74a997315ba368d
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = dd3cff382af879365cf78f2539f1789bbbfd3f17
 SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors__ioctl.inc) = 231f519a0564aa69d746a7f0bbee1b1aeed927a7
 SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 126424635f89439e89371a57754232082e2290c6
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = c351daa33f782bfe644f7b8517618a12328c7996
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 35fae2ad655097b5dc019f6e3e82ed415f92db07
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 063eb96ea0d41c9359df4c347c4da08a995f0702
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 206f075ce7fa3445abd7207dfc96c615dd841c13
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 0275ddf3c60d43d793f656a76c5cccc46f28116a
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = 0ed3a4a6467c73247e646e2f7ac8f5ea9e3f4da7
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 6d94bc705f62aeeda363f19a6f073738d3bae3b0
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = f4e69e0e3a27f763bd4064d34eec1aaa965b79b8
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = ae99697d5331e6b05f26f74c48119f5cacd4c4e0
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 19490197ac6d275d777f5b79b96c25aa6d4e3d71
 SHA1 (patch-lib_scudo_scudo__platform.h) = 6b07d34d5f1209c7f1bf21fdf0cda5cbe88b802f
 SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = 4fbaa64e3f8d28cdbab6783c296dfd31cecb45a5
 SHA1 (patch-test_asan_lit.cfg) = 121fb6db88a17b8b588a40ee022a9a219d84493f
 SHA1 (patch-test_lsan_lit.common.cfg) = 10dc251f80efb96d015a22c740dc20b1843b9a11
 SHA1 (patch-test_scudo_lit.cfg) = 171f340505f7c87f74a7814b9c4d12d7fcbc5690
-SHA1 (patch-utils_generate__netbsd__ioctls.awk) = da4a60c43df5cd9b022ff108ac5120486f76a1d2
-SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 9a767008efc35b0b509287e6c2ccc14f49446323
+SHA1 (patch-utils_generate__netbsd__ioctls.awk) = aaf50ad0f15c57b0eb7da37522828c675899329d
+SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 5dc4ca20a02342db800188244babb46824e97b06
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 4f626b6071..2a8c8f0148 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-09 21:22:24.945820046 +0000
+--- include/sanitizer/netbsd_syscall_hooks.h.orig	2018-01-10 03:43:34.753420424 +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 840c701cc5..09595d7b09 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
@@ -2,7 +2,15 @@ $NetBSD$
 
 --- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-01-08 15:33:14.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_common_interceptors.inc
-@@ -1703,6 +1703,7 @@ FORMAT_INTERCEPTOR_IMPL(__isoc99_snprint
+@@ -75,6 +75,7 @@
+ #define clock_settime __clock_settime50
+ #define ctime __ctime50
+ #define ctime_r __ctime_r50
++#define devname __devname50
+ #define getitimer __getitimer50
+ #define getpwent __getpwent50
+ #define getpwnam __getpwnam50
+@@ -1703,6 +1704,7 @@ FORMAT_INTERCEPTOR_IMPL(__isoc99_snprint
  
  #if SANITIZER_INTERCEPT_IOCTL
  #include "sanitizer_common_interceptors_ioctl.inc"
@@ -10,7 +18,7 @@ $NetBSD$
  INTERCEPTOR(int, ioctl, int d, unsigned long request, ...) {
    // We need a frame pointer, because we call into ioctl_common_[pre|post] which
    // can trigger a report and we need to be able to unwind through this
-@@ -6452,6 +6453,246 @@ INTERCEPTOR(wchar_t *, wcsncat, wchar_t 
+@@ -6452,6 +6454,304 @@ INTERCEPTOR(wchar_t *, wcsncat, wchar_t 
  #define INIT_WCSCAT
  #endif
  
@@ -60,23 +68,51 @@ $NetBSD$
 +  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);
 +  return REAL(kvm_getargv)(kd, kp, nchr);
 +}
 +
 +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));
-+  return REAL(kvm_getargv2)(kd, kp, nchr);
++  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));
-+  return REAL(kvm_getenvv)(kd, kp, nchr);
++  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) {
@@ -84,6 +120,8 @@ $NetBSD$
 +  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);
 +  return REAL(kvm_getenvv2)(kd, kp, nchr);
 +}
 +
@@ -253,15 +291,44 @@ $NetBSD$
 +#else
 +#define INIT_KVM
 +#endif
++
++#if SANITIZER_INTERCEPT_DEVNAME
++INTERCEPTOR(char *, devname, u64 dev, u32 type) {
++  void *ctx;
++  char *name;
++  COMMON_INTERCEPTOR_ENTER(ctx, devname, dev, type);
++  name = REAL(devname)(dev, type);
++  if (name)
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, name, REAL(strlen)(name) + 1);
++  return name;
++}
++
++INTERCEPTOR(int, devname_r, u64 dev, u32 type, char *path, uptr len) {
++  void *ctx;
++  int res;
++  COMMON_INTERCEPTOR_ENTER(ctx, devname_r, dev, type, path, len);
++  res = REAL(devname_r)(dev, type, path, len);
++  if (!res)
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, path, REAL(strlen)(path) + 1);
++  return res;
++}
++
++#define INIT_DEVNAME \
++  COMMON_INTERCEPT_FUNCTION(devname); \
++  COMMON_INTERCEPT_FUNCTION(devname_r)
++#else
++#define INIT_DEVNAME
++#endif
 +
  static void InitializeCommonInterceptors() {
    static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
    interceptor_metadata_map = new((void *)&metadata_mem) MetadataHashMap();
-@@ -6663,6 +6904,7 @@ static void InitializeCommonInterceptors
+@@ -6663,6 +6963,8 @@ static void InitializeCommonInterceptors
    INIT_GETLOADAVG;
    INIT_WCSLEN;
    INIT_WCSCAT;
 +  INIT_KVM;
++  INIT_DEVNAME;
  
  #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 6d0a2de351..86f21b55c6 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-09 21:22:24.948571630 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc.orig	2018-01-10 03:43:34.755788801 +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 be64d517d7..8ddb8f5b8c 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-09 21:22:24.949458680 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig	2018-01-10 03:43:34.756636071 +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 46d2cb5709..ed12047af2 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
@@ -2,10 +2,11 @@ $NetBSD$
 
 --- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-01-08 15:33:13.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_platform_interceptors.h
-@@ -432,4 +432,6 @@
+@@ -432,4 +432,7 @@
  #define SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION (!SI_WINDOWS && SI_NOT_FUCHSIA)
  #define SANITIZER_INTERCEPT_BSD_SIGNAL SI_ANDROID
  
 +#define SANITIZER_INTERCEPT_KVM SI_NETBSD
++#define SANITIZER_INTERCEPT_DEVNAME SI_NETBSD
 +
  #endif  // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H
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 01967c2e71..0a55bed4ab 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
@@ -2,13 +2,19 @@ $NetBSD$
 
 --- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2017-11-28 08:23:47.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
-@@ -15,7 +15,53 @@
+@@ -15,7 +15,59 @@
  #include "sanitizer_platform.h"
  
  #if SANITIZER_NETBSD
++
++#define _KMEMUSER
++#define RAY_DO_SIGLEV
++
 +#include <sys/param.h>
 +#include <sys/types.h>
 +
++#include <sys/sysctl.h>
++
 +#include <altq/altq.h>
 +#include <altq/altq_afmap.h>
 +#include <altq/altq_blue.h>
@@ -56,7 +62,7 @@ $NetBSD$
  #include <dirent.h>
  #include <glob.h>
  #include <grp.h>
-@@ -28,6 +74,8 @@
+@@ -28,6 +80,8 @@
  #include <net/route.h>
  #include <netdb.h>
  #include <netinet/in.h>
@@ -65,7 +71,7 @@ $NetBSD$
  #include <netinet/ip_mroute.h>
  #include <poll.h>
  #include <pthread.h>
-@@ -35,6 +83,93 @@
+@@ -35,6 +89,92 @@
  #include <semaphore.h>
  #include <signal.h>
  #include <stddef.h>
@@ -73,7 +79,6 @@ $NetBSD$
 +#include <sys/disk.h>
 +#include <sys/disklabel.h>
 +#include <sys/mount.h>
-+#define RAY_DO_SIGLEV
 +#include <dev/biovar.h>
 +#include <dev/bluetooth/btdev.h>
 +#include <dev/bluetooth/btsco.h>
@@ -159,7 +164,7 @@ $NetBSD$
  #include <sys/filio.h>
  #include <sys/ipc.h>
  #include <sys/mman.h>
-@@ -44,6 +179,7 @@
+@@ -44,6 +184,7 @@
  #include <sys/mtio.h>
  #include <sys/ptrace.h>
  #include <sys/resource.h>
@@ -167,7 +172,7 @@ $NetBSD$
  #include <sys/shm.h>
  #include <sys/signal.h>
  #include <sys/socket.h>
-@@ -99,18 +235,83 @@ unsigned struct_sockaddr_sz = sizeof(str
+@@ -99,18 +240,83 @@ unsigned struct_sockaddr_sz = sizeof(str
  unsigned ucontext_t_sz = sizeof(ucontext_t);
  unsigned struct_rlimit_sz = sizeof(struct rlimit);
  unsigned struct_timespec_sz = sizeof(struct timespec);
@@ -251,9 +256,13 @@ $NetBSD$
  int shmctl_ipc_stat = (int)IPC_STAT;
  
  unsigned struct_utmp_sz = sizeof(struct utmp);
-@@ -138,64 +339,1725 @@ int glob_altdirfunc = GLOB_ALTDIRFUNC;
+@@ -137,65 +343,1729 @@ int glob_altdirfunc = GLOB_ALTDIRFUNC;
+ 
  unsigned path_max = PATH_MAX;
  
++int struct_kinfo_proc_sz = sizeof(struct kinfo_proc);
++int struct_kinfo_proc2_sz = sizeof(struct kinfo_proc2);
++
  // ioctl arguments
 -unsigned struct_ifreq_sz = sizeof(struct ifreq);
 -unsigned struct_termios_sz = sizeof(struct termios);
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 ed0b2d3e66..b4f305c4ca 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
@@ -135,10 +135,13 @@ $NetBSD$
  struct __sanitizer_glob_t {
    uptr gl_pathc;
    uptr gl_matchc;
-@@ -317,6 +363,48 @@ extern int glob_altdirfunc;
+@@ -317,6 +363,52 @@ extern int glob_altdirfunc;
  
  extern unsigned path_max;
  
++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;
@@ -160,6 +163,7 @@ $NetBSD$
 +extern int ptrace_pt_setdbregs;
 +extern int ptrace_pt_getdbregs;
 +
++
 +struct __sanitizer_ptrace_io_desc {
 +  int piod_op;
 +  void *piod_offs;
@@ -184,7 +188,7 @@ $NetBSD$
  struct __sanitizer_wordexp_t {
    uptr we_wordc;
    char **we_wordv;
-@@ -350,6 +438,43 @@ struct __sanitizer_ifconf {
+@@ -350,6 +442,43 @@ struct __sanitizer_ifconf {
    } ifc_ifcu;
  };
  
@@ -228,7 +232,7 @@ $NetBSD$
  #define IOC_NRBITS 8
  #define IOC_TYPEBITS 8
  #define IOC_SIZEBITS 14
-@@ -374,185 +499,1712 @@ struct __sanitizer_ifconf {
+@@ -374,185 +503,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-utils_generate__netbsd__ioctls.awk b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
index bca8f6fa3f..9192fdc948 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-09 21:22:24.951931928 +0000
+--- utils/generate_netbsd_ioctls.awk.orig	2018-01-10 03:43:34.758804212 +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 bd7f3185c3..3a44e7fa88 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-09 21:22:24.952625369 +0000
+--- utils/generate_netbsd_syscalls.awk.orig	2018-01-10 03:43:34.759458559 +0000
 +++ utils/generate_netbsd_syscalls.awk
 @@ -0,0 +1,2989 @@
 +#!/usr/bin/awk -f


Home | Main Index | Thread Index | Old Index