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



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Dec 4 03:12:28 2018 +0100
Changeset:	fdd189853098579543a023cb5fb13573d3aedf32

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: Rebase to SVN r. 348228

Merged upstream:
dd939986a Add interceptors for the sysctl(3) API family from NetBSD
67639f9cc Add interceptors for the fts(3) API family from NetBSD
c8fae517a Add new interceptor for regex(3) in NetBSD

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

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 | 318 +--------------------
 ...zer__common_sanitizer__platform__interceptors.h |  12 +-
 ...__common_sanitizer__platform__limits__netbsd.cc |  17 +-
 ...r__common_sanitizer__platform__limits__netbsd.h |  28 +-
 6 files changed, 25 insertions(+), 360 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index 07ff3524f6..b33963e9cf 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=	348027
+SVN_REVISION.compiler-rt=	348228
 
 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 dd5b073a60..b46c0e6490 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) = 934f7318250490286f397b370c830f016a9cab7c
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 8b7621c83753ed0208c8cb3416955f40eac7837f
 SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 845a516a43bbaa82b2522c395965fd8f64e09bdb
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 347271ac1494ee6b85044de237f10915c6493d05
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 1297b65dcc640313fade4b1783e98422d7e017d5
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 69190e87731a0cec10b955be9cc3e07a378ecf52
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = b1f40e36d3ab4efdcd45f8f4dfa9eb838d9339ce
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 9162e365f643e72c68d9c7e345b257f24ee2bd86
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = a84d50140e9896f591bfd04776aae557b33a9f98
 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
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 e9549aafe2..8167a575ad 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,20 +1,8 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-11-30 20:02:43.000000000 +0000
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-12-04 02:10:16.133279323 +0000
 +++ lib/sanitizer_common/sanitizer_common_interceptors.inc
-@@ -77,6 +77,11 @@
- #define ctime __ctime50
- #define ctime_r __ctime_r50
- #define devname __devname50
-+#define fts_children __fts_children60
-+#define fts_close __fts_close60
-+#define fts_open __fts_open60
-+#define fts_read __fts_read60
-+#define fts_set __fts_set60
- #define getitimer __getitimer50
- #define getmntinfo __getmntinfo13
- #define getpwent __getpwent50
-@@ -112,6 +117,7 @@
+@@ -117,6 +117,7 @@
  #define times __times13
  #define wait3 __wait350
  #define wait4 __wait450
@@ -22,7 +10,7 @@ $NetBSD$
  extern const unsigned short *_ctype_tab_;
  extern const short *_toupper_tab_;
  extern const short *_tolower_tab_;
-@@ -3078,17 +3084,28 @@ INTERCEPTOR(int, sendmmsg, int fd, struc
+@@ -3083,17 +3084,28 @@ INTERCEPTOR(int, sendmmsg, int fd, struc
  #endif
  
  #if SANITIZER_INTERCEPT_GETPEERNAME
@@ -60,7 +48,7 @@ $NetBSD$
    return res;
  }
  #define INIT_GETPEERNAME COMMON_INTERCEPT_FUNCTION(getpeername);
-@@ -4258,7 +4275,7 @@ INTERCEPTOR(int, fstatfs64, int fd, void
+@@ -4263,7 +4275,7 @@ INTERCEPTOR(int, fstatfs64, int fd, void
  #endif
  
  #if SANITIZER_INTERCEPT_STATVFS
@@ -69,293 +57,10 @@ $NetBSD$
    void *ctx;
    COMMON_INTERCEPTOR_ENTER(ctx, statvfs, path, buf);
    if (path) COMMON_INTERCEPTOR_READ_RANGE(ctx, path, REAL(strlen)(path) + 1);
-@@ -7362,6 +7379,1503 @@ INTERCEPTOR(int, getvfsstat, void *buf, 
- #define INIT_GETVFSSTAT
+@@ -7653,6 +7665,1220 @@ INTERCEPTOR(void *, asysctlbyname, const
+ #define INIT_SYSCTL
  #endif
  
-+#if SANITIZER_INTERCEPT_SYSCTL
-+INTERCEPTOR(int, sysctl, int *name, unsigned int namelen, void *oldp,
-+            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)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, name, namelen * sizeof(*name));
-+  if (newp)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, newp, newlen);
-+  res = REAL(sysctl)(name, namelen, oldp, oldlenp, newp, newlen);
-+  if (!res) {
-+    if (oldlenp)
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, oldlenp, sizeof(*oldlenp));
-+    if (oldp && oldlenp)
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, oldp, *oldlenp);
-+  }
-+  return res;
-+}
-+
-+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)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, sname, REAL(strlen)(sname) + 1);
-+  res = REAL(sysctlbyname)(sname, oldp, oldlenp, newp, newlen);
-+  if (!res) {
-+    if (oldlenp)
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, oldlenp, sizeof(*oldlenp));
-+    if (oldp && 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) {
-+    if (namelenp)
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, namelenp, sizeof(*namelenp));
-+    if (name && 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) {
-+    if (namelenp)
-+      COMMON_INTERCEPTOR_WRITE_RANGE(ctx, namelenp, sizeof(*namelenp));
-+    if (name && 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 (len)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, len, sizeof(*len));
-+  if (res && 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 (len)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, len, sizeof(*len));
-+  if (res && len)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, *len);
-+  return res;
-+}
-+#define INIT_SYSCTL                                                            \
-+  COMMON_INTERCEPT_FUNCTION(sysctl);                                           \
-+  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
-+
-+#if SANITIZER_INTERCEPT_FTS
-+INTERCEPTOR(void *, fts_open, char *const *path_argv, int options,
-+            int (*compar)(void **, void **)) {
-+  void *ctx;
-+  void *fts;
-+  COMMON_INTERCEPTOR_ENTER(ctx, fts_open, path_argv, options, compar);
-+  if (path_argv) {
-+    char *const *pa = path_argv;
-+    while (*pa) {
-+      COMMON_INTERCEPTOR_READ_RANGE(ctx, pa, sizeof(char **));
-+      COMMON_INTERCEPTOR_READ_RANGE(ctx, *pa, REAL(strlen)(*pa) + 1);
-+      pa++;
-+    }
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, pa, sizeof(char **));
-+  }
-+  fts = REAL(fts_open)(path_argv, options, compar);
-+  if (fts)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, fts, struct_FTS_sz);
-+  return fts;
-+}
-+
-+INTERCEPTOR(void *, fts_read, void *ftsp) {
-+  void *ctx;
-+  void *ftsent;
-+  COMMON_INTERCEPTOR_ENTER(ctx, fts_read, ftsp);
-+  COMMON_INTERCEPTOR_READ_RANGE(ctx, ftsp, struct_FTS_sz);
-+  ftsent = REAL(fts_read)(ftsp);
-+  if (ftsent)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ftsent, struct_FTSENT_sz);
-+  return ftsent;
-+}
-+
-+INTERCEPTOR(void *, fts_children, void *ftsp, int options) {
-+  void *ctx;
-+  void *ftsent;
-+  COMMON_INTERCEPTOR_ENTER(ctx, fts_children, ftsp, options);
-+  COMMON_INTERCEPTOR_READ_RANGE(ctx, ftsp, struct_FTS_sz);
-+  ftsent = REAL(fts_children)(ftsp, options);
-+  if (ftsent)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ftsent, struct_FTSENT_sz);
-+  return ftsent;
-+}
-+
-+INTERCEPTOR(int, fts_set, void *ftsp, void *f, int options) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, fts_set, ftsp, f, options);
-+  COMMON_INTERCEPTOR_READ_RANGE(ctx, ftsp, struct_FTS_sz);
-+  COMMON_INTERCEPTOR_READ_RANGE(ctx, f, struct_FTSENT_sz);
-+  return REAL(fts_set)(ftsp, f, options);
-+}
-+
-+INTERCEPTOR(int, fts_close, void *ftsp) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, fts_close, ftsp);
-+  COMMON_INTERCEPTOR_READ_RANGE(ctx, ftsp, struct_FTS_sz);
-+  return REAL(fts_close)(ftsp);
-+}
-+#define INIT_FTS                                                               \
-+  COMMON_INTERCEPT_FUNCTION(fts_open);                                         \
-+  COMMON_INTERCEPT_FUNCTION(fts_read);                                         \
-+  COMMON_INTERCEPT_FUNCTION(fts_children);                                     \
-+  COMMON_INTERCEPT_FUNCTION(fts_set);                                          \
-+  COMMON_INTERCEPT_FUNCTION(fts_close);
-+#else
-+#define INIT_FTS
-+#endif
-+
-+#if SANITIZER_INTERCEPT_REGEX
-+INTERCEPTOR(int, regcomp, void *preg, const char *pattern, int cflags) {
-+  void *ctx;
-+  int res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, regcomp, preg, pattern, cflags);
-+  if (pattern)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, pattern, REAL(strlen)(pattern) + 1);
-+  res = REAL(regcomp)(preg, pattern, cflags);
-+  if (!res)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, preg, struct_regex_sz);
-+  return res;
-+}
-+
-+INTERCEPTOR(int, regexec, const void *preg, const char *string, SIZE_T nmatch,
-+            struct __sanitizer_regmatch *pmatch[], int eflags) {
-+  void *ctx;
-+  int res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, regexec, preg, string, nmatch, pmatch, eflags);
-+  if (preg)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, preg, struct_regex_sz);
-+  if (string)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, string, REAL(strlen)(string) + 1);
-+  res = REAL(regexec)(preg, string, nmatch, pmatch, eflags);
-+  if (!res && pmatch)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, pmatch, nmatch * struct_regmatch_sz);
-+  return res;
-+}
-+
-+INTERCEPTOR(SIZE_T, regerror, int errcode, const void *preg, char *errbuf,
-+            SIZE_T errbuf_size) {
-+  void *ctx;
-+  SIZE_T res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, regerror, errcode, preg, errbuf, errbuf_size);
-+  if (preg)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, preg, struct_regex_sz);
-+  res = REAL(regerror)(errcode, preg, errbuf, errbuf_size);
-+  if (errbuf)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, errbuf, REAL(strlen)(errbuf) + 1);
-+  return res;
-+}
-+
-+INTERCEPTOR(void, regfree, const void *preg) {
-+  void *ctx;
-+  COMMON_INTERCEPTOR_ENTER(ctx, regfree, preg);
-+  if (preg)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, preg, struct_regex_sz);
-+  REAL(regfree)(preg);
-+}
-+
-+INTERCEPTOR(SSIZE_T, regnsub, char *buf, SIZE_T bufsiz, const char *sub,
-+            const struct __sanitizer_regmatch *rm, const char *str) {
-+  void *ctx;
-+  SSIZE_T res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, regnsub, buf, bufsiz, sub, rm, str);
-+  if (sub)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, sub, REAL(strlen)(sub) + 1);
-+  // Hardcode 10 elements as requested by the documentation as minimum
-+  if (rm)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, rm, 10 * struct_regmatch_sz);
-+  if (str)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, str, REAL(strlen)(str) + 1);
-+  res = REAL(regnsub)(buf, bufsiz, sub, rm, str);
-+  if (res > 0 && buf)
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, REAL(strlen)(buf) + 1);
-+  return res;
-+}
-+
-+INTERCEPTOR(SSIZE_T, regasub, char **buf, const char *sub,
-+            const struct __sanitizer_regmatch *rm, const char *sstr) {
-+  void *ctx;
-+  SSIZE_T res;
-+  COMMON_INTERCEPTOR_ENTER(ctx, regasub, buf, sub, rm, sstr);
-+  if (sub)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, sub, REAL(strlen)(sub) + 1);
-+  // Hardcode 10 elements as requested by the documentation as minimum
-+  if (rm)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, rm, 10 * struct_regmatch_sz);
-+  if (sstr)
-+    COMMON_INTERCEPTOR_READ_RANGE(ctx, sstr, REAL(strlen)(sstr) + 1);
-+  res = REAL(regasub)(buf, sub, rm, sstr);
-+  if (res > 0 && buf) {
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, sizeof(char *));
-+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, *buf, REAL(strlen)(*buf) + 1);
-+  }
-+  return res;
-+}
-+#define INIT_REGEX                                                             \
-+  COMMON_INTERCEPT_FUNCTION(regcomp);                                          \
-+  COMMON_INTERCEPT_FUNCTION(regexec);                                          \
-+  COMMON_INTERCEPT_FUNCTION(regerror);                                         \
-+  COMMON_INTERCEPT_FUNCTION(regfree);                                          \
-+  COMMON_INTERCEPT_FUNCTION(regnsub);                                          \
-+  COMMON_INTERCEPT_FUNCTION(regasub);
-+#else
-+#define INIT_REGEX
-+#endif
-+
 +#if SANITIZER_INTERCEPT_STRTONUM
 +INTERCEPTOR(long long, strtonum, const char *nptr, long long minval,
 +            long long maxval, const char **errstr) {
@@ -1573,13 +1278,10 @@ $NetBSD$
  static void InitializeCommonInterceptors() {
    static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
    interceptor_metadata_map = new((void *)&metadata_mem) MetadataHashMap();
-@@ -7619,6 +9133,25 @@ static void InitializeCommonInterceptors
-   INIT_MI_VECTOR_HASH;
-   INIT_SETVBUF;
-   INIT_GETVFSSTAT;
-+  INIT_SYSCTL;
-+  INIT_FTS;
-+  INIT_REGEX;
+@@ -7913,6 +9139,22 @@ static void InitializeCommonInterceptors
+   INIT_REGEX;
+   INIT_FTS;
+   INIT_SYSCTL;
 +  INIT_STRTONUM;
 +  INIT_VIS;
 +  INIT_SHA1;
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 88c1025274..73306ed883 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,14 +1,12 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-11-30 20:02:43.000000000 +0000
+--- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-12-04 02:10:16.133783507 +0000
 +++ lib/sanitizer_common/sanitizer_platform_interceptors.h
-@@ -522,4 +522,24 @@
- #define SANITIZER_INTERCEPT_MI_VECTOR_HASH SI_NETBSD
- #define SANITIZER_INTERCEPT_GETVFSSTAT SI_NETBSD
+@@ -525,4 +525,22 @@
+ #define SANITIZER_INTERCEPT_FTS SI_NETBSD
+ #define SANITIZER_INTERCEPT_SYSCTL SI_NETBSD
  
-+#define SANITIZER_INTERCEPT_SYSCTL SI_NETBSD
-+#define SANITIZER_INTERCEPT_FTS SI_NETBSD
-+#define SANITIZER_INTERCEPT_REGEX SI_NETBSD
++
 +#define SANITIZER_INTERCEPT_STRTONUM SI_NETBSD
 +#define SANITIZER_INTERCEPT_VIS SI_NETBSD
 +#define SANITIZER_INTERCEPT_SHA1 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 fc139f8c0d..bb1fda9639 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,19 +1,8 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2018-11-30 20:02:43.000000000 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2018-12-04 02:10:16.132427259 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
-@@ -253,6 +253,10 @@ unsigned struct_rlimit_sz = sizeof(struc
- unsigned struct_timespec_sz = sizeof(struct timespec);
- unsigned struct_sembuf_sz = sizeof(struct sembuf);
- unsigned struct_kevent_sz = sizeof(struct kevent);
-+unsigned struct_FTS_sz = sizeof(FTS);
-+unsigned struct_FTSENT_sz = sizeof(FTSENT);
-+unsigned struct_regex_sz = sizeof(regex_t);
-+unsigned struct_regmatch_sz = sizeof(regmatch_t);
- unsigned struct_utimbuf_sz = sizeof(struct utimbuf);
- unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
- unsigned struct_timex_sz = sizeof(struct timex);
-@@ -2092,6 +2096,38 @@ unsigned IOCTL_SNDCTL_DSP_SILENCE = SNDC
+@@ -2096,6 +2096,38 @@ unsigned IOCTL_SNDCTL_DSP_SILENCE = SNDC
  
  const int si_SEGV_MAPERR = SEGV_MAPERR;
  const int si_SEGV_ACCERR = SEGV_ACCERR;
@@ -52,7 +41,7 @@ $NetBSD$
  }  // namespace __sanitizer
  
  using namespace __sanitizer;
-@@ -2253,4 +2289,10 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd);
+@@ -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);
  
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 2ce07e9b63..134cd64a03 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,32 +1,8 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2018-11-30 20:02:43.000000000 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2018-12-04 02:10:16.134662809 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
-@@ -60,6 +60,15 @@ extern unsigned struct_timespec_sz;
- extern unsigned struct_sembuf_sz;
- 
- extern unsigned struct_kevent_sz;
-+extern unsigned struct_FTS_sz;
-+extern unsigned struct_FTSENT_sz;
-+extern unsigned struct_regex_sz;
-+extern unsigned struct_regmatch_sz;
-+
-+struct __sanitizer_regmatch {
-+  OFF_T rm_so;
-+  OFF_T rm_eo;
-+};
- 
- union __sanitizer_sigval {
-   int sival_int;
-@@ -396,6 +405,7 @@ extern int ptrace_pt_getfpregs;
- extern int ptrace_pt_setdbregs;
- extern int ptrace_pt_getdbregs;
- 
-+
- struct __sanitizer_ptrace_io_desc {
-   int piod_op;
-   void *piod_offs;
-@@ -2202,6 +2212,78 @@ extern unsigned IOCTL_SNDCTL_DSP_SILENCE
+@@ -2212,6 +2212,78 @@ extern unsigned IOCTL_SNDCTL_DSP_SILENCE
  
  extern const int si_SEGV_MAPERR;
  extern const int si_SEGV_ACCERR;


Home | Main Index | Thread Index | Old Index