pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Rebase to SVN r. 322646



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Jan 17 15:44:27 2018 +0100
Changeset:	99ee167765dd91e63c932742439adbc48ba94f8c

Modified Files:
	compiler-rt-netbsd/Makefile
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
	compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
	compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt
	compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
	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_asan_lit.cfg
	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: Rebase to SVN r. 322646

One patch merged upstream:
Add new interceptor: acct(2)
https://reviews.llvm.org/D42066

Add a local interceptor for fgetln().

Improve style of the code, shorten lines in the code.

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=99ee167765dd91e63c932742439adbc48ba94f8c

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                        |  26 ++---
 .../patches/patch-cmake_config-ix.cmake            |   2 +-
 ...atch-include_sanitizer_netbsd__syscall__hooks.h |   2 +-
 .../patches/patch-lib_fuzzer_tests_CMakeLists.txt  |   2 +-
 .../patch-lib_hwasan_hwasan__interceptors.cc       |   2 +-
 ...zer__common_sanitizer__common__interceptors.inc | 127 +++++++++++++--------
 ...b_sanitizer__common_sanitizer__internal__defs.h |   2 +-
 ...mmon_sanitizer__netbsd__interceptors__ioctl.inc |   2 +-
 ...nitizer__common_sanitizer__netbsd__syscalls.inc |   2 +-
 ...zer__common_sanitizer__platform__interceptors.h |   9 +-
 ...r__common_sanitizer__platform__limits__netbsd.h |   2 +-
 compiler-rt-netbsd/patches/patch-test_asan_lit.cfg |   6 +-
 .../patch-utils_generate__netbsd__ioctls.awk       |   2 +-
 .../patch-utils_generate__netbsd__syscalls.awk     |   2 +-
 15 files changed, 110 insertions(+), 80 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index 4c9e938bc0..dc926d27a7 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=	322469
+SVN_REVISION.compiler-rt=	322646
 
 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 98df95f50a..2f56c24710 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -1,29 +1,29 @@
 $NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
 
-SHA1 (patch-cmake_config-ix.cmake) = 37f794de11df3290d215bacc1a4bc6d99bd7c328
+SHA1 (patch-cmake_config-ix.cmake) = 11195c8254c84d5972a2ffee8a9e66758ab7105b
 SHA1 (patch-include_CMakeLists.txt) = b6f2713b7e5337aed542442936b6f747efe0a607
-SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = 880885798c3ebe83962b96c0999367fd6ba938e1
+SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = f0ba84c8d81711047cb74e613c9ef1038bed9579
 SHA1 (patch-lib_asan_asan__interceptors.cc) = ea4005ce02775060ff52af76d568c450892067b5
 SHA1 (patch-lib_esan_esan__interceptors.cpp) = a7103ca053e92a810c87c593262bb386f3d02606
-SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 155032af15e557f67d9ef8ca51963c956dafda52
-SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = 2e0f78a6e022ac8ab531bf4fe9d602e5f06d4085
+SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = a4cc85d3bda79e8814b5add42cf165190e15f2f0
+SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = c49ab3759728bbd3e27580a3d0d3e2db0bceb2a6
 SHA1 (patch-lib_msan_msan__interceptors.cc) = 9f0c1a05430314581b1711f1d5a1ab8870053879
 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) = 52d46e6a7a966619a8f29ef876eaea5db173d842
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = f8058c627c83ed65699684064a52d00357ec6905
 SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors__ioctl.inc) = 231f519a0564aa69d746a7f0bbee1b1aeed927a7
-SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 32b82050d6a19c104cfbe85d9e2e95c5c6f980b6
+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) = b13064600009e121b3a6a356c9903a87e8c3a1f5
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = dcb827142ecc6105335843454174741d6dbc3f20
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = bd15094536104ca1801619a666d0cf0a4e86c801
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = b6464555f7409405c025367a6e64a5b8309ece74
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = a71057aef68211fb57f0efe444db2f44f1216ea5
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 7349731082eb4a4e6744456cb1144256b17c6bc8
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 47236661e37673d66a52e80c3f55be13029014ca
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 08f6c4924a58babe8332455cf49b782c92a1bca5
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 2441d51ba207b067a52b7688076335bb38ad0bb9
 SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc) = 7e0deaeeada33bd13575251e5d8fb4a0ee4c53e8
 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_asan_lit.cfg) = b5a1fc8725a46ac7bee2f08bdd92ad9a9a31fbcf
 SHA1 (patch-test_lsan_lit.common.cfg) = 10dc251f80efb96d015a22c740dc20b1843b9a11
 SHA1 (patch-test_scudo_lit.cfg) = 171f340505f7c87f74a7814b9c4d12d7fcbc5690
-SHA1 (patch-utils_generate__netbsd__ioctls.awk) = 7935f00b242201fef01540d0ade7d87be5b029e4
-SHA1 (patch-utils_generate__netbsd__syscalls.awk) = c99a38947c22549c0230d31b939d7caa8f1bcd64
+SHA1 (patch-utils_generate__netbsd__ioctls.awk) = 05d72ac7c783d60c0e8eb7b3760d210d31e5d433
+SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 597b8b9c52ba8d000b90589abddd478ba382dde0
diff --git a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
index 83272b06e3..09d96aab77 100644
--- a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
+++ b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- cmake/config-ix.cmake.orig	2018-01-15 06:00:16.005632076 +0000
+--- cmake/config-ix.cmake.orig	2018-01-15 06:00:16.000000000 +0000
 +++ cmake/config-ix.cmake
 @@ -542,7 +542,7 @@ else()
  endif()
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 6f12c9901a..0212065608 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-15 06:15:08.859550198 +0000
+--- include/sanitizer/netbsd_syscall_hooks.h.orig	2018-01-17 14:43:16.027644634 +0000
 +++ include/sanitizer/netbsd_syscall_hooks.h
 @@ -0,0 +1,4730 @@
 +//===-- netbsd_syscall_hooks.h --------------------------------------------===//
diff --git a/compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt b/compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt
index 2b333e71bc..ced2fd4a56 100644
--- a/compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt
+++ b/compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/fuzzer/tests/CMakeLists.txt.orig	2018-01-15 06:00:16.375143319 +0000
+--- lib/fuzzer/tests/CMakeLists.txt.orig	2018-01-17 14:42:51.596169898 +0000
 +++ lib/fuzzer/tests/CMakeLists.txt
 @@ -10,6 +10,9 @@ add_custom_target(FuzzerUnitTests)
  set_target_properties(FuzzerUnitTests PROPERTIES FOLDER "Compiler-RT Tests")
diff --git a/compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc
index da41eea12a..fcf4ab65fc 100644
--- a/compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_hwasan_hwasan__interceptors.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/hwasan/hwasan_interceptors.cc.orig	2018-01-15 06:00:16.372665123 +0000
+--- lib/hwasan/hwasan_interceptors.cc.orig	2018-01-15 06:00:16.000000000 +0000
 +++ lib/hwasan/hwasan_interceptors.cc
 @@ -457,6 +457,7 @@ int OnExit() {
      (void)(s);                                \
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 148dd75982..66aa73e33e 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-01-15 06:00:16.210403175 +0000
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-01-17 14:42:51.590090912 +0000
 +++ lib/sanitizer_common/sanitizer_common_interceptors.inc
 @@ -36,6 +36,7 @@
  //   COMMON_INTERCEPTOR_MEMCPY_IMPL
@@ -127,12 +127,13 @@ $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
-@@ -2776,6 +2796,29 @@ INTERCEPTOR(int, accept4, int fd, void *
+@@ -2776,6 +2796,30 @@ INTERCEPTOR(int, accept4, int fd, void *
  #define INIT_ACCEPT4
  #endif
  
 +#if SANITIZER_INTERCEPT_PACCEPT
-+INTERCEPTOR(int, paccept, int fd, void *addr, unsigned *addrlen, __sanitizer_sigset_t *set, int f) {
++INTERCEPTOR(int, paccept, int fd, void *addr, unsigned *addrlen,
++            __sanitizer_sigset_t *set, int f) {
 +  void *ctx;
 +  COMMON_INTERCEPTOR_ENTER(ctx, paccept, fd, addr, addrlen, set, f);
 +  unsigned addrlen0 = 0;
@@ -157,7 +158,7 @@ $NetBSD$
  #if SANITIZER_INTERCEPT_MODF
  INTERCEPTOR(double, modf, double x, double *iptr) {
    void *ctx;
-@@ -3164,7 +3207,14 @@ INTERCEPTOR(char *, setlocale, int categ
+@@ -3164,7 +3208,14 @@ INTERCEPTOR(char *, setlocale, int categ
    if (locale)
      COMMON_INTERCEPTOR_READ_RANGE(ctx, locale, REAL(strlen)(locale) + 1);
    char *res = REAL(setlocale)(category, locale);
@@ -173,8 +174,8 @@ $NetBSD$
    return res;
  }
  
-@@ -6463,6 +6513,586 @@ INTERCEPTOR(wchar_t *, wcsncat, wchar_t 
- #define INIT_WCSCAT
+@@ -6476,6 +6527,614 @@ INTERCEPTOR(int, acct, const char *file)
+ #define INIT_ACCT
  #endif
  
 +#if SANITIZER_INTERCEPT_KVM
@@ -186,9 +187,11 @@ $NetBSD$
 +  return REAL(kvm_close)(kd);
 +}
 +
-+INTERCEPTOR(int, kvm_dump_header, struct __sanitizer_kvm *kd, bool (*write_buf)(void*,void*,uptr), void *cookie, int dumpsize) {
++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);
++  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);
@@ -202,7 +205,8 @@ $NetBSD$
 +  return REAL(kvm_dump_inval)(kd);
 +}
 +
-+INTERCEPTOR(int, kvm_dump_mkheader, struct __sanitizer_kvm *kd, OFF_T dump_off) {
++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)
@@ -210,7 +214,8 @@ $NetBSD$
 +  return REAL(kvm_dump_mkheader)(kd, dump_off);
 +}
 +
-+INTERCEPTOR(int, kvm_dump_wrtheader, struct __sanitizer_kvm *kd, __sanitizer_FILE *fp, int dumpsize) {
++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)
@@ -218,7 +223,8 @@ $NetBSD$
 +  return REAL(kvm_dump_wrtheader)(kd, fp, dumpsize);
 +}
 +
-+INTERCEPTOR(char **, kvm_getargv, struct __sanitizer_kvm *kd, void *kp, int nchr) {
++INTERCEPTOR(char **, kvm_getargv, struct __sanitizer_kvm *kd, void *kp,
++            int nchr) {
 +  void *ctx;
 +  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getargv, kd, kp, nchr);
 +  if (kd)
@@ -228,7 +234,8 @@ $NetBSD$
 +  return REAL(kvm_getargv)(kd, kp, nchr);
 +}
 +
-+INTERCEPTOR(char **, kvm_getargv2, struct __sanitizer_kvm *kd, void *kp, int 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);
@@ -249,7 +256,8 @@ $NetBSD$
 +  return argv;
 +}
 +
-+INTERCEPTOR(char **, kvm_getenvv, struct __sanitizer_kvm *kd, void *kp, int nchr) {
++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);
@@ -270,7 +278,8 @@ $NetBSD$
 +  return argv;
 +}
 +
-+INTERCEPTOR(char **, kvm_getenvv2, struct __sanitizer_kvm *kd, void *kp, int nchr) {
++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);
@@ -299,7 +308,8 @@ $NetBSD$
 +  return REAL(kvm_geterr)(kd);
 +}
 +
-+INTERCEPTOR(int, kvm_getloadavg, struct __sanitizer_kvm *kd, double loadavg[], int nelem) {
++INTERCEPTOR(int, kvm_getloadavg, struct __sanitizer_kvm *kd, double loadavg[],
++            int nelem) {
 +  void *ctx;
 +  COMMON_INTERCEPTOR_ENTER(ctx, kvm_getloadavg, kd, loadavg, nelem);
 +  if (kd)
@@ -307,7 +317,8 @@ $NetBSD$
 +  return REAL(kvm_getloadavg)(kd, loadavg, nelem);
 +}
 +
-+INTERCEPTOR(char *, kvm_getfiles, struct __sanitizer_kvm *kd, int op, int arg, int *cnt) {
++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)
@@ -325,7 +336,8 @@ $NetBSD$
 +  return name;
 +}
 +
-+INTERCEPTOR(void *, kvm_getlwps, struct __sanitizer_kvm *kd, int pid, unsigned long paddr, uptr esize, int *cnt) {
++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);
@@ -339,7 +351,8 @@ $NetBSD$
 +  return res;
 +}
 +
-+INTERCEPTOR(void *, kvm_getproc2, struct __sanitizer_kvm *kd, int op, int arg, uptr esize, int *cnt) {
++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);
@@ -353,7 +366,8 @@ $NetBSD$
 +  return res;
 +}
 +
-+INTERCEPTOR(void *, kvm_getprocs, struct __sanitizer_kvm *kd, int op, int arg, int *cnt) {
++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)
@@ -369,7 +383,8 @@ $NetBSD$
 +  return REAL(kvm_nlist)(kd, nl);
 +}
 +
-+INTERCEPTOR(struct __sanitizer_kvm *, kvm_open, char *uf, char *mf, char *sf, int flag, char *program) {
++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);
@@ -385,7 +400,8 @@ $NetBSD$
 +  return kd;
 +}
 +
-+INTERCEPTOR(struct __sanitizer_kvm *, kvm_openfiles, char *uf, char *mf, char *sf, int flag, char *program) {
++INTERCEPTOR(struct __sanitizer_kvm *, kvm_openfiles, char *uf, char *mf,
++            char *sf, int flag, char *program) {
 +  void *ctx;
 +  struct __sanitizer_kvm *kd;
 +  COMMON_INTERCEPTOR_ENTER(ctx, kvm_openfiles, uf, mf, sf, flag, program);
@@ -401,7 +417,8 @@ $NetBSD$
 +  return kd;
 +}
 +
-+INTERCEPTOR(uptr, kvm_read, struct __sanitizer_kvm *kd, unsigned long kva, void *buf, uptr len) {
++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);
@@ -411,7 +428,8 @@ $NetBSD$
 +  return res;
 +}
 +
-+INTERCEPTOR(uptr, kvm_uread, struct __sanitizer_kvm *kd, unsigned long uva, void *buf, uptr len) {
++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);
@@ -421,7 +439,8 @@ $NetBSD$
 +  return res;
 +}
 +
-+INTERCEPTOR(uptr, kvm_write, struct __sanitizer_kvm *kd, unsigned long kva, void *buf, uptr len) {
++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);
@@ -487,10 +506,12 @@ $NetBSD$
 +#endif
 +
 +#if SANITIZER_INTERCEPT_SYSCTL
-+INTERCEPTOR(int, sysctl, int *name, unsigned int namelen, void *oldp, uptr *oldlenp, void *newp, uptr newlen) {
++INTERCEPTOR(int, sysctl, int *name, unsigned int namelen, void *oldp,
++            uptr *oldlenp, void *newp, uptr newlen) {
 +  void *ctx;
 +  int res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, sysctl, name, namelen, oldp, oldlenp, newp, newlen);
++  COMMON_INTERCEPTOR_ENTER(ctx, sysctl, name, namelen, oldp, oldlenp, newp,
++                           newlen);
 +  if (name) {
 +    COMMON_INTERCEPTOR_READ_RANGE(ctx, name, namelen * sizeof(*name));
 +  }
@@ -503,10 +524,12 @@ $NetBSD$
 +  return res;
 +}
 +
-+INTERCEPTOR(int, sysctlbyname, char *sname, void *oldp, uptr *oldlenp, void *newp, uptr newlen) {
++INTERCEPTOR(int, sysctlbyname, char *sname, void *oldp, uptr *oldlenp,
++            void *newp, uptr newlen) {
 +  void *ctx;
 +  int res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, sysctlbyname, sname, oldp, oldlenp, newp, newlen);
++  COMMON_INTERCEPTOR_ENTER(ctx, sysctlbyname, sname, oldp, oldlenp, newp,
++                           newlen);
 +  if (sname) {
 +    COMMON_INTERCEPTOR_READ_RANGE(ctx, sname, REAL(strlen)(sname) + 1);
 +  }
@@ -557,7 +580,8 @@ $NetBSD$
 +#endif
 +
 +#if SANITIZER_INTERCEPT_GETGROUPLIST
-+INTERCEPTOR(int, getgrouplist, char *name, u32 basegid, u32 *groups, int *ngroups) {
++INTERCEPTOR(int, getgrouplist, char *name, u32 basegid, u32 *groups,
++            int *ngroups) {
 +  void *ctx;
 +  int res;
 +  COMMON_INTERCEPTOR_ENTER(ctx, getgrouplist, name, basegid, groups, ngroups);
@@ -569,10 +593,12 @@ $NetBSD$
 +    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, groups, sizeof(*groups) * (*ngroups));
 +  return res;
 +}
-+INTERCEPTOR(int, getgroupmembership, char *name, u32 basegid, u32 *groups, int maxgrp, int *ngroups) {
++INTERCEPTOR(int, getgroupmembership, char *name, u32 basegid, u32 *groups,
++            int maxgrp, int *ngroups) {
 +  void *ctx;
 +  int res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, getgroupmembership, name, basegid, groups, maxgrp, ngroups);
++  COMMON_INTERCEPTOR_ENTER(ctx, getgroupmembership, name, basegid, groups,
++                           maxgrp, ngroups);
 +  if (name) {
 +    COMMON_INTERCEPTOR_READ_RANGE(ctx, name, REAL(strlen)(name) + 1);
 +  }
@@ -617,20 +643,6 @@ $NetBSD$
 +#define INIT_FACCESSAT
 +#endif
 +
-+#if SANITIZER_INTERCEPT_ACCT
-+INTERCEPTOR(int, acct, char *file) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, acct, file);
-+  if (file) {
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, file, REAL(strlen)(file) + 1);
-+  }
-+  return REAL(acct)(file);
-+}
-+#define INIT_ACCT COMMON_INTERCEPT_FUNCTION(acct)
-+#else
-+#define INIT_ACCT
-+#endif
-+
 +#if SANITIZER_INTERCEPT_ATOF
 +INTERCEPTOR(double, atof, char *nptr) {
 +  void *ctx;
@@ -756,11 +768,28 @@ $NetBSD$
 +#else
 +#define INIT_GETTTYENT
 +#endif
++
++#if SANITIZER_INTERCEPT_FGETLN
++INTERCEPTOR(char *, fgetln, __sanitizer_FILE *stream, SIZE_T *len) {
++  void *ctx;
++  char *str;
++  COMMON_INTERCEPTOR_ENTER(ctx, fgetln, stream, len);
++  str = REAL(fgetln)(stream, len);
++  if (str && len) {
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, len, sizeof(*len));
++    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, str, *len);
++  }
++  return str;
++}
++#define INIT_FGETLN COMMON_INTERCEPT_FUNCTION(fgetln)
++#else
++#define INIT_FGETLN
++#endif
 +
  static void InitializeCommonInterceptors() {
    static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
    interceptor_metadata_map = new((void *)&metadata_mem) MetadataHashMap();
-@@ -6542,6 +7172,7 @@ static void InitializeCommonInterceptors
+@@ -6555,6 +7214,7 @@ static void InitializeCommonInterceptors
    INIT_GETSOCKOPT;
    INIT_ACCEPT;
    INIT_ACCEPT4;
@@ -768,10 +797,10 @@ $NetBSD$
    INIT_MODF;
    INIT_RECVMSG;
    INIT_SENDMSG;
-@@ -6674,6 +7305,20 @@ static void InitializeCommonInterceptors
-   INIT_GETLOADAVG;
+@@ -6688,6 +7348,20 @@ static void InitializeCommonInterceptors
    INIT_WCSLEN;
    INIT_WCSCAT;
+   INIT_ACCT;
 +  INIT_KVM;
 +  INIT_DEVNAME;
 +  INIT_SYSCTL;
@@ -779,13 +808,13 @@ $NetBSD$
 +  INIT_GETGROUPLIST;
 +  INIT_ACCESS;
 +  INIT_FACCESSAT;
-+  INIT_ACCT;
 +  INIT_ATOF;
 +  INIT_USER_FROM_UID;
 +  INIT_UID_FROM_USER;
 +  INIT_GROUP_FROM_GID;
 +  INIT_GID_FROM_USER;
 +  INIT_GETTTYENT;
++  INIT_FGETLN;
  
  #if SANITIZER_NETBSD
    COMMON_INTERCEPT_FUNCTION(__libc_mutex_lock);
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
index cee875137e..56def83df9 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_internal_defs.h.orig	2018-01-15 06:00:15.999252256 +0000
+--- lib/sanitizer_common/sanitizer_internal_defs.h.orig	2018-01-15 06:00:15.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_internal_defs.h
 @@ -177,7 +177,9 @@ typedef uptr tid_t;
  // This header should NOT include any other headers to avoid portability issues.
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 3432442834..5127f0bce2 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-15 06:15:08.862815099 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc.orig	2018-01-17 14:43:16.030408097 +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 9a79602fd2..8e8287e7ce 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-15 06:15:08.863705740 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig	2018-01-17 14:43:16.031258790 +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 6f932cdbdf..92aadb1e02 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,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-01-08 15:33:13.000000000 +0000
+--- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-01-17 14:42:51.590537504 +0000
 +++ lib/sanitizer_common/sanitizer_platform_interceptors.h
 @@ -217,7 +217,8 @@
    (SI_FREEBSD || SI_LINUX_NOT_ANDROID || SI_SOLARIS)
@@ -12,7 +12,7 @@ $NetBSD$
  #define SANITIZER_INTERCEPT_MODF SI_POSIX
  #define SANITIZER_INTERCEPT_RECVMSG SI_POSIX
  #define SANITIZER_INTERCEPT_SENDMSG SI_POSIX
-@@ -432,4 +433,19 @@
+@@ -432,6 +433,20 @@
  #define SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION (!SI_WINDOWS && SI_NOT_FUCHSIA)
  #define SANITIZER_INTERCEPT_BSD_SIGNAL SI_ANDROID
  
@@ -23,12 +23,13 @@ $NetBSD$
 +#define SANITIZER_INTERCEPT_GETGROUPLIST SI_NETBSD
 +#define SANITIZER_INTERCEPT_ACCESS SI_NETBSD
 +#define SANITIZER_INTERCEPT_FACCESSAT SI_NETBSD
-+#define SANITIZER_INTERCEPT_ACCT SI_NETBSD
+ #define SANITIZER_INTERCEPT_ACCT SI_NETBSD
 +#define SANITIZER_INTERCEPT_ATOF SI_NETBSD
 +#define SANITIZER_INTERCEPT_USER_FROM_UID SI_NETBSD
 +#define SANITIZER_INTERCEPT_UID_FROM_USER SI_NETBSD
 +#define SANITIZER_INTERCEPT_GROUP_FROM_GID SI_NETBSD
 +#define SANITIZER_INTERCEPT_GID_FROM_GROUP SI_NETBSD
 +#define SANITIZER_INTERCEPT_GETTTYENT SI_NETBSD
-+
++#define SANITIZER_INTERCEPT_FGETLN 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 c1cc202e2f..e7d600cb68 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
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2018-01-15 06:00:16.210858154 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2018-01-15 06:00:16.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
 @@ -57,33 +57,36 @@ extern unsigned ucontext_t_sz;
  extern unsigned struct_rlimit_sz;
diff --git a/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg b/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
index a013a63a2d..00e0de11f9 100644
--- a/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
+++ b/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- test/asan/lit.cfg.orig	2017-12-04 19:21:18.000000000 +0000
+--- test/asan/lit.cfg.orig	2018-01-17 14:42:51.220803892 +0000
 +++ test/asan/lit.cfg
 @@ -209,7 +209,7 @@ else:
    config.substitutions.append(('%pie', '-pie'))
  
  # Only run the tests on supported OSs.
--if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows']:
-+if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows', 'NetBSD']:
+-if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'SunOS', 'Windows']:
++if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'SunOS', 'Windows', 'NetBSD']:
    config.unsupported = True
  
  if config.host_os == 'Darwin' and config.target_arch in ["x86_64", "x86_64h"]:
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 d06472ca1d..679f32c605 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-15 06:15:08.866297286 +0000
+--- utils/generate_netbsd_ioctls.awk.orig	2018-01-17 14:43:16.033483467 +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 f7d1bd91f2..27cbaf6185 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-15 06:15:08.866984996 +0000
+--- utils/generate_netbsd_syscalls.awk.orig	2018-01-17 14:43:16.034138612 +0000
 +++ utils/generate_netbsd_syscalls.awk
 @@ -0,0 +1,2989 @@
 +#!/usr/bin/awk -f


Home | Main Index | Thread Index | Old Index