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. 348370



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Dec 5 16:51:22 2018 +0100
Changeset:	a96748abc55b4ec4b4fcef88ba707bd51abcdbf4

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
Added Files:
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_get__module__and__offset__for__pc.cc
Removed Files:
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h

Log Message:
compiler-rt-netbsd: Rebase to SVN r. 348370

Merged upstream:
b3a7f1d78 Add a new interceptor for modctl(2) from NetBSD
39c2acc81 Add a new interceptor for nl_langinfo(3) from NetBSD

Apply cleanups.

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

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                        | 10 +--
 ...zer__common_sanitizer__common__interceptors.inc | 87 ++--------------------
 ...b_sanitizer__common_sanitizer__internal__defs.h | 14 ----
 ...zer__common_sanitizer__platform__interceptors.h | 10 +--
 ...__common_sanitizer__platform__limits__netbsd.cc | 26 ++-----
 ...r__common_sanitizer__platform__limits__netbsd.h | 14 +---
 ..._TestCases_get__module__and__offset__for__pc.cc | 12 +++
 8 files changed, 38 insertions(+), 137 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index 2d5a945738..8776126924 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=	348313
+SVN_REVISION.compiler-rt=	348370
 
 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 b5de77ead0..b68e0dda83 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -3,11 +3,11 @@ $NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
 SHA1 (patch-lib_asan_asan__posix.cc) = be7e47c252e30184639f7ed1c98c75a8667fd261
 SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 2a81399dddc19de5bd51e77ef52b8b5cd61b7dc4
 SHA1 (patch-lib_msan_msan__linux.cc) = b5df0f4f5930d7c1681b1ad867c893d01d6e5cf7
-SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 598d51059973d06c5dcd0cc74c84ce4f48bdfefe
-SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 845a516a43bbaa82b2522c395965fd8f64e09bdb
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 12743f6de39f15c2c0f13559f3aa26c41406e24f
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 3ada12291ac80ba0f239dd913797c4a18e3013d1
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 7d549399a1c16d4cff3f59be20b88064f9b620a8
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = e7437622dcfc0f20e4a68eefad2a7ab2cb2e91cd
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 30efde105e5fdea6e09bbc34eb4e307008ce819d
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 9420e76fdf63ac419bde42b4ad80ab578a39b9e0
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 8bd78ea09db18d51829d9b58b58bdef7b7b261e6
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = ff76b8b19863cdb28f243580ece33db5abd03a80
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 21b7becbd2289e9b29d3bae94b8dd83e828965fb
 SHA1 (patch-lib_xray_tests_CMakeLists.txt) = a5bee64ac6e4c0ff43aad200072d15c128ca03ad
+SHA1 (patch-test_sanitizer__common_TestCases_get__module__and__offset__for__pc.cc) = b80b00233a663a1b754c9ca428bee5e8593597e7
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 70ee410b59..7af1d79df3 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-12-04 23:26:02.105248262 +0000
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-12-05 15:17:53.888571701 +0000
 +++ lib/sanitizer_common/sanitizer_common_interceptors.inc
 @@ -117,6 +117,7 @@
  #define times __times13
@@ -48,19 +48,10 @@ $NetBSD$
    return res;
  }
  #define INIT_GETPEERNAME COMMON_INTERCEPT_FUNCTION(getpeername);
-@@ -4263,7 +4275,7 @@ INTERCEPTOR(int, fstatfs64, int fd, void
+@@ -7724,6 +7736,1160 @@ INTERCEPTOR(int, modctl, int operation, 
+ #define INIT_MODCTL
  #endif
  
- #if SANITIZER_INTERCEPT_STATVFS
--INTERCEPTOR(int, statvfs, char *path, void *buf) {
-+INTERCEPTOR(int, statvfs, const char *path, void *buf) {
-   void *ctx;
-   COMMON_INTERCEPTOR_ENTER(ctx, statvfs, path, buf);
-   if (path) COMMON_INTERCEPTOR_READ_RANGE(ctx, path, REAL(strlen)(path) + 1);
-@@ -7665,6 +7677,1220 @@ INTERCEPTOR(int, sysctlgetmibinfo, char 
- #endif
- 
- 
 +#if SANITIZER_INTERCEPT_STRTONUM
 +INTERCEPTOR(long long, strtonum, const char *nptr, long long minval,
 +            long long maxval, const char **errstr) {
@@ -718,20 +709,6 @@ $NetBSD$
 +#define INIT_MD5
 +#endif
 +
-+#if SANITIZER_INTERCEPT_NL_LANGINFO
-+INTERCEPTOR(char *, nl_langinfo, long item) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, nl_langinfo, item);
-+  char *ret = REAL(nl_langinfo)(item);
-+  if (ret)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, REAL(strlen)(ret) + 1);
-+  return ret;
-+}
-+#define INIT_NL_LANGINFO COMMON_INTERCEPT_FUNCTION(nl_langinfo)
-+#else
-+#define INIT_NL_LANGINFO
-+#endif
-+
 +#if SANITIZER_INTERCEPT_FPARSELN
 +INTERCEPTOR(char *, fparseln, __sanitizer_FILE *stream, SIZE_T *len,
 +            SIZE_T *lineno, const char delim[3], int flags) {
@@ -753,52 +730,6 @@ $NetBSD$
 +#define INIT_FPARSELN
 +#endif
 +
-+#if SANITIZER_INTERCEPT_MODCTL
-+INTERCEPTOR(int, modctl, int operation, void *argp) {
-+  void *ctx;
-+  int ret;
-+  COMMON_INTERCEPTOR_ENTER(ctx, modctl, operation, argp);
-+
-+  if (operation == modctl_load) {
-+    if (argp) {
-+      __sanitizer_modctl_load_t *ml = (__sanitizer_modctl_load_t *)argp;
-+      COMMON_INTERCEPTOR_READ_RANGE(ctx, ml, sizeof(*ml));
-+      if (ml->ml_filename)
-+        COMMON_INTERCEPTOR_READ_RANGE(ctx, ml->ml_filename,
-+                                      REAL(strlen)(ml->ml_filename) + 1);
-+      if (ml->ml_props)
-+        COMMON_INTERCEPTOR_READ_RANGE(ctx, ml->ml_props, ml->ml_propslen);
-+    }
-+    ret = REAL(modctl)(operation, argp);
-+  } else if (operation == modctl_unload) {
-+    if (argp) {
-+      const char *name = (const char *)argp;
-+      COMMON_INTERCEPTOR_READ_RANGE(ctx, name, REAL(strlen)(name) + 1);
-+    }
-+    ret = REAL(modctl)(operation, argp);
-+  } else if (operation == modctl_stat) {
-+    uptr iov_len;
-+    struct __sanitizer_iovec *iov = (struct __sanitizer_iovec *)argp;
-+    if (iov) {
-+      COMMON_INTERCEPTOR_READ_RANGE(ctx, iov, sizeof(*iov));
-+      iov_len = iov->iov_len;
-+    }
-+    ret = REAL(modctl)(operation, argp);
-+    if (iov)
-+      COMMON_INTERCEPTOR_WRITE_RANGE(
-+          ctx, iov->iov_base, iov_len < iov->iov_len ? iov_len : iov->iov_len);
-+  } else if (operation == modctl_exists)
-+    ret = REAL(modctl)(operation, argp);
-+  else
-+    ret = REAL(modctl)(operation, argp);
-+
-+  return ret;
-+}
-+#define INIT_MODCTL COMMON_INTERCEPT_FUNCTION(modctl)
-+#else
-+#define INIT_MODCTL
-+#endif
-+
 +#if SANITIZER_INTERCEPT_STATVFS1
 +INTERCEPTOR(int, statvfs1, const char *path, void *buf, int flags) {
 +  void *ctx;
@@ -1278,19 +1209,17 @@ $NetBSD$
  static void InitializeCommonInterceptors() {
    static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
    interceptor_metadata_map = new((void *)&metadata_mem) MetadataHashMap();
-@@ -7927,6 +9153,22 @@ static void InitializeCommonInterceptors
-   INIT_SYSCTL;
-   INIT_ASYSCTL;
-   INIT_SYSCTLGETMIBINFO;
+@@ -7989,5 +9155,20 @@ static void InitializeCommonInterceptors
+   INIT_NL_LANGINFO;
+   INIT_MODCTL;
+ 
 +  INIT_STRTONUM;
 +  INIT_VIS;
 +  INIT_SHA1;
 +  INIT_MD2;
 +  INIT_MD4;
 +  INIT_MD5;
-+  INIT_NL_LANGINFO;
 +  INIT_FPARSELN;
-+  INIT_MODCTL;
 +  INIT_STATVFS1;
 +  INIT_NETBSD_MOUNT;
 +  INIT_FSEEK;
@@ -1298,6 +1227,6 @@ $NetBSD$
 +  INIT_RMD160;
 +  INIT_SHA2;
 +  INIT_GETCHAR;
- 
++
    INIT___PRINTF_CHK;
  }
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
deleted file mode 100644
index a3158acb4c..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- lib/sanitizer_common/sanitizer_internal_defs.h.orig	2018-11-06 11:10:14.000000000 +0000
-+++ lib/sanitizer_common/sanitizer_internal_defs.h
-@@ -197,7 +197,9 @@ typedef u64 tid_t;
- // This header should NOT include any other headers to avoid portability issues.
- 
- // Common defs.
-+#ifndef INLINE
- #define INLINE inline
-+#endif
- #define INTERFACE_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE
- #define SANITIZER_WEAK_DEFAULT_IMPL \
-   extern "C" SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE NOINLINE
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 9f8042e112..995b5c0c4f 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,10 +1,10 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-12-04 23:26:02.105749528 +0000
+--- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-12-05 15:17:53.889092850 +0000
 +++ lib/sanitizer_common/sanitizer_platform_interceptors.h
-@@ -527,4 +527,22 @@
- #define SANITIZER_INTERCEPT_ASYSCTL SI_NETBSD
- #define SANITIZER_INTERCEPT_SYSCTLGETMIBINFO SI_NETBSD
+@@ -529,4 +529,20 @@
+ #define SANITIZER_INTERCEPT_NL_LANGINFO SI_NETBSD
+ #define SANITIZER_INTERCEPT_MODCTL SI_NETBSD
  
 +
 +#define SANITIZER_INTERCEPT_STRTONUM SI_NETBSD
@@ -13,9 +13,7 @@ $NetBSD$
 +#define SANITIZER_INTERCEPT_MD2 SI_NETBSD
 +#define SANITIZER_INTERCEPT_MD4 SI_NETBSD
 +#define SANITIZER_INTERCEPT_MD5 SI_NETBSD
-+#define SANITIZER_INTERCEPT_NL_LANGINFO SI_POSIX
 +#define SANITIZER_INTERCEPT_FPARSELN SI_POSIX
-+#define SANITIZER_INTERCEPT_MODCTL SI_NETBSD
 +#define SANITIZER_INTERCEPT_STATVFS1 SI_NETBSD
 +#define SANITIZER_INTERCEPT_NETBSD_MOUNT SI_NETBSD
 +#define SANITIZER_INTERCEPT_FSEEK SI_POSIX
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 706f4667b2..6d31302112 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
@@ -1,11 +1,11 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2018-12-04 02:10:16.000000000 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2018-12-05 15:17:53.889846309 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
-@@ -2096,6 +2096,38 @@ unsigned IOCTL_SNDCTL_DSP_SILENCE = SNDC
- 
- const int si_SEGV_MAPERR = SEGV_MAPERR;
- const int si_SEGV_ACCERR = SEGV_ACCERR;
+@@ -2101,6 +2101,35 @@ const int modctl_load = MODCTL_LOAD;
+ const int modctl_unload = MODCTL_UNLOAD;
+ const int modctl_stat = MODCTL_STAT;
+ const int modctl_exists = MODCTL_EXISTS;
 +
 +const unsigned SHA1_CTX_sz = sizeof(SHA1_CTX);
 +const unsigned SHA1_return_length = SHA1_DIGEST_STRING_LENGTH; // 41
@@ -33,22 +33,8 @@ $NetBSD$
 +
 +const int unvis_valid = UNVIS_VALID;
 +const int unvis_validpush = UNVIS_VALIDPUSH;
-+const int modctl_load = MODCTL_LOAD;
-+const int modctl_unload = MODCTL_UNLOAD;
-+const int modctl_stat = MODCTL_STAT;
-+const int modctl_exists = MODCTL_EXISTS;
++
 +const unsigned fpos_t_sz = sizeof(fpos_t);
  }  // namespace __sanitizer
  
  using namespace __sanitizer;
-@@ -2257,4 +2289,10 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd);
- CHECK_SIZE_AND_OFFSET(group, gr_gid);
- CHECK_SIZE_AND_OFFSET(group, gr_mem);
- 
-+CHECK_TYPE_SIZE(modctl_load_t);
-+CHECK_SIZE_AND_OFFSET(modctl_load_t, ml_filename);
-+CHECK_SIZE_AND_OFFSET(modctl_load_t, ml_flags);
-+CHECK_SIZE_AND_OFFSET(modctl_load_t, ml_props);
-+CHECK_SIZE_AND_OFFSET(modctl_load_t, ml_propslen);
-+
- #endif  // SANITIZER_NETBSD
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 0736323b7c..b4cdb27f2b 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,8 +1,8 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2018-12-04 02:10:16.000000000 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2018-12-05 15:17:53.889431418 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
-@@ -2212,6 +2212,78 @@ extern unsigned IOCTL_SNDCTL_DSP_SILENCE
+@@ -2223,6 +2223,68 @@ extern unsigned IOCTL_SNDCTL_DSP_SILENCE
  
  extern const int si_SEGV_MAPERR;
  extern const int si_SEGV_ACCERR;
@@ -34,16 +34,6 @@ $NetBSD$
 +extern const int unvis_valid;
 +extern const int unvis_validpush;
 +
-+typedef struct __sanitizer_modctl_load {
-+  const char *ml_filename;
-+  int ml_flags;
-+  const char *ml_props;
-+  uptr ml_propslen;
-+} __sanitizer_modctl_load_t;
-+extern const int modctl_load;
-+extern const int modctl_unload;
-+extern const int modctl_stat;
-+extern const int modctl_exists;
 +extern const unsigned fpos_t_sz;
 +
 +struct __sanitizer_cdbr {
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_get__module__and__offset__for__pc.cc b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_get__module__and__offset__for__pc.cc
new file mode 100644
index 0000000000..3947349f95
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_get__module__and__offset__for__pc.cc
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc.orig	2018-10-31 22:49:16.000000000 +0000
++++ test/sanitizer_common/TestCases/get_module_and_offset_for_pc.cc
+@@ -5,7 +5,6 @@
+ 
+ // UNSUPPORTED: i386-darwin
+ // XFAIL: android
+-// XFAIL: netbsd && msan
+ 
+ // Tests __sanitizer_get_module_and_offset_for_pc.
+ 


Home | Main Index | Thread Index | Old Index