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. 341181
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Fri Aug 31 10:18:38 2018 +0200
Changeset: 93045aefc53e5221309dfd883e49099913173d76
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__linux.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__openbsd.cc
Removed Files:
compiler-rt-netbsd/patches/patch-lib_interception_interception.h
compiler-rt-netbsd/patches/patch-lib_safestack_safestack.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__mac.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__posix.h
Log Message:
compiler-rt-netbsd: Update to svn r. 341181
Merged 2 patches upstream:
- introduce new type UINTMAX
- introduce internal_sysctl()
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=93045aefc53e5221309dfd883e49099913173d76
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/Makefile | 4 +-
compiler-rt-netbsd/distinfo | 12 +--
.../patches/patch-lib_interception_interception.h | 12 ---
.../patches/patch-lib_safestack_safestack.cc | 0
...zer__common_sanitizer__common__interceptors.inc | 19 +---
...patch-lib_sanitizer__common_sanitizer__linux.cc | 107 ++++-----------------
..._sanitizer__common_sanitizer__linux__libcdep.cc | 15 +--
.../patch-lib_sanitizer__common_sanitizer__mac.cc | 28 ------
...tch-lib_sanitizer__common_sanitizer__openbsd.cc | 37 -------
.../patch-lib_sanitizer__common_sanitizer__posix.h | 14 ---
10 files changed, 29 insertions(+), 219 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index fe7a6c4b9b..6e06aaa9e8 100644
--- a/compiler-rt-netbsd/Makefile
+++ b/compiler-rt-netbsd/Makefile
@@ -1,11 +1,11 @@
# $NetBSD: Makefile.common,v 1.7 2015/07/20 05:49:53 adam Exp $
-PKGNAME= compiler-rt-7.0.0
+PKGNAME= compiler-rt-8.0.0
CATEGORIES= lang devel
SVN_REPOSITORIES= compiler-rt
SVN_REPO.compiler-rt= http://llvm.org/svn/llvm-project/compiler-rt/trunk
-SVN_REVISION.compiler-rt= 340168
+SVN_REVISION.compiler-rt= 341181
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 ccc6c5341f..5b4c3348bc 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -6,23 +6,19 @@ SHA1 (patch-cmake_config-ix.cmake) = 1456a6d244727885d51b68d333de7119523d1d6d
SHA1 (patch-lib_asan_asan__posix.cc) = be7e47c252e30184639f7ed1c98c75a8667fd261
SHA1 (patch-lib_fuzzer_FuzzerLoop.cpp) = 18ec3311ab74dc12321579a3b01adc900af2a3a9
SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 8f3afca11a9f45a7e843db7c65eeee292292b8bf
-SHA1 (patch-lib_interception_interception.h) = df981a3929568807134d3aadbfcc1adb99fbe83d
SHA1 (patch-lib_msan_msan__interceptors.cc) = 7af07c88b0ddf650f3df5dea4f6664ff9393d963
SHA1 (patch-lib_msan_msan__linux.cc) = b5df0f4f5930d7c1681b1ad867c893d01d6e5cf7
-SHA1 (patch-lib_safestack_safestack.cc) = da39a3ee5e6b4b0d3255bfef95601890afd80709
-SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 4c3291b1bbb6ad997db35dd168bf210c6fbd3733
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 92f45b328972b6459b90d4d53c44943d43910312
SHA1 (patch-lib_sanitizer__common_sanitizer__interceptors__ioctl__netbsd.inc) = 1c6e8c4a755af57d523d06b12f08a1946f1aef25
SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = e231d87d8e04d528f73275f5de7000c2b395a9c4
-SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = e4823f1e17f6119762f11b6d77f07ce8bbb7b88d
-SHA1 (patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc) = bfde1c5fa8c786a506fc9a8f0fb24531419573e7
-SHA1 (patch-lib_sanitizer__common_sanitizer__mac.cc) = 19549c7e4c4703aa0199c0ae6cb380751aa183a3
-SHA1 (patch-lib_sanitizer__common_sanitizer__openbsd.cc) = d2ee02d530c1a2293caf00579ef489809114e180
+SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = 80e1809e4c394b3cc1b790fffc8159e2deb4cee2
+SHA1 (patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc) = 175a6c188beda1d3933dd326692ea54fe5ce5139
+SHA1 (patch-lib_sanitizer__common_sanitizer__openbsd.cc) = da39a3ee5e6b4b0d3255bfef95601890afd80709
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 87684ad05a8e3a5ab2f1c9cf00cbecab4823eeb3
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = b52e02792201d54d1f9e9336a8cf74ff8c9eca68
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = e8a0d9389f3ddd41f911e00f8ff62e214441296d
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = 3fb785fdc01d68425b7ff9ccabd7d28057b47597
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 9f535e84c3e1ab5704b11e388ac240439a9900d6
-SHA1 (patch-lib_sanitizer__common_sanitizer__posix.h) = 557bf6ba52b11bcf3b7ea8f9ca43bdca5e932e0b
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__bsd.cc) = c4ef1f0bd0f297c5b9e8f93b75cd9df082cb9394
SHA1 (patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc) = 86d53010debaf2cc5c9793d83186db2db76b280f
SHA1 (patch-lib_scudo_scudo__platform.h) = 68f33b18d913984c3a459597ef62f63d36184ca9
diff --git a/compiler-rt-netbsd/patches/patch-lib_interception_interception.h b/compiler-rt-netbsd/patches/patch-lib_interception_interception.h
deleted file mode 100644
index b184027e15..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_interception_interception.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- lib/interception/interception.h.orig 2018-08-21 21:25:37.000000000 +0000
-+++ lib/interception/interception.h
-@@ -29,6 +29,7 @@ typedef __sanitizer::uptr SIZE_T;
- typedef __sanitizer::sptr SSIZE_T;
- typedef __sanitizer::sptr PTRDIFF_T;
- typedef __sanitizer::s64 INTMAX_T;
-+typedef __sanitizer::u64 UINTMAX_T;
- typedef __sanitizer::OFF_T OFF_T;
- typedef __sanitizer::OFF64_T OFF64_T;
-
diff --git a/compiler-rt-netbsd/patches/patch-lib_safestack_safestack.cc b/compiler-rt-netbsd/patches/patch-lib_safestack_safestack.cc
deleted file mode 100644
index e69de29bb2..0000000000
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 1509e79a21..c63c95c6fb 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-08-21 21:25:40.000000000 +0000
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig 2018-08-31 08:13:42.913618270 +0000
+++ lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -77,6 +77,11 @@
#define ctime __ctime50
@@ -61,23 +61,6 @@ $NetBSD$
return res;
}
#define INIT_GETPEERNAME COMMON_INTERCEPT_FUNCTION(getpeername);
-@@ -3345,14 +3363,14 @@ INTERCEPTOR(INTMAX_T, strtoimax, const c
- return res;
- }
-
--INTERCEPTOR(INTMAX_T, strtoumax, const char *nptr, char **endptr, int base) {
-+INTERCEPTOR(UINTMAX_T, strtoumax, const char *nptr, char **endptr, int base) {
- void *ctx;
- COMMON_INTERCEPTOR_ENTER(ctx, strtoumax, nptr, endptr, base);
- // FIXME: under ASan the call below may write to freed memory and corrupt
- // its metadata. See
- // https://github.com/google/sanitizers/issues/321.
- char *real_endptr;
-- INTMAX_T res = REAL(strtoumax)(nptr, &real_endptr, base);
-+ UINTMAX_T res = REAL(strtoumax)(nptr, &real_endptr, base);
- StrtolFixAndCheck(ctx, nptr, endptr, real_endptr, base);
- return res;
- }
@@ -4240,7 +4258,7 @@ INTERCEPTOR(int, fstatfs64, int fd, void
#endif
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux.cc
index a279d01999..b7e526d596 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux.cc
@@ -1,8 +1,8 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_linux.cc.orig 2018-08-21 21:25:39.000000000 +0000
+--- lib/sanitizer_common/sanitizer_linux.cc.orig 2018-08-31 08:13:43.281423466 +0000
+++ lib/sanitizer_common/sanitizer_linux.cc
-@@ -155,7 +155,20 @@ extern void internal_sigreturn();
+@@ -158,7 +158,20 @@ extern void internal_sigreturn();
# else
# define SANITIZER_USE_GETENTROPY 0
# endif
@@ -24,7 +24,7 @@ $NetBSD$
namespace __sanitizer {
-@@ -169,12 +182,37 @@ namespace __sanitizer {
+@@ -172,12 +185,37 @@ namespace __sanitizer {
#include "sanitizer_syscall_generic.inc"
#endif
@@ -63,7 +63,7 @@ $NetBSD$
return internal_syscall64(SYSCALL(mmap), addr, length, prot, flags, fd,
(long)0, offset);
#elif SANITIZER_FREEBSD || SANITIZER_LINUX_USES_64BIT_SYSCALLS
-@@ -191,20 +229,52 @@ uptr internal_mmap(void *addr, uptr leng
+@@ -194,20 +232,52 @@ uptr internal_mmap(void *addr, uptr leng
#if !SANITIZER_OPENBSD
uptr internal_munmap(void *addr, uptr length) {
@@ -117,7 +117,7 @@ $NetBSD$
return internal_syscall(SYSCALL(openat), AT_FDCWD, (uptr)filename, flags);
#else
return internal_syscall_ptr(SYSCALL(open), (uptr)filename, flags);
-@@ -212,7 +282,13 @@ uptr internal_open(const char *filename,
+@@ -215,7 +285,13 @@ uptr internal_open(const char *filename,
}
uptr internal_open(const char *filename, int flags, u32 mode) {
@@ -132,7 +132,7 @@ $NetBSD$
return internal_syscall(SYSCALL(openat), AT_FDCWD, (uptr)filename, flags,
mode);
#else
-@@ -222,21 +298,45 @@ uptr internal_open(const char *filename,
+@@ -225,21 +301,45 @@ uptr internal_open(const char *filename,
uptr internal_read(fd_t fd, void *buf, uptr count) {
sptr res;
@@ -178,7 +178,7 @@ $NetBSD$
HANDLE_EINTR(res, internal_syscall64(SYSCALL(ftruncate), fd, 0, (s64)size));
#else
HANDLE_EINTR(res, (sptr)internal_syscall(SYSCALL(ftruncate), fd,
-@@ -313,7 +413,14 @@ static void kernel_stat_to_stat(struct k
+@@ -316,7 +416,14 @@ static void kernel_stat_to_stat(struct k
#endif
uptr internal_stat(const char *path, void *buf) {
@@ -194,7 +194,7 @@ $NetBSD$
return internal_syscall_ptr(SYSCALL(fstatat), AT_FDCWD, (uptr)path, (uptr)buf,
0);
#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
-@@ -339,6 +446,14 @@ uptr internal_stat(const char *path, voi
+@@ -342,6 +449,14 @@ uptr internal_stat(const char *path, voi
uptr internal_lstat(const char *path, void *buf) {
#if SANITIZER_NETBSD
@@ -209,7 +209,7 @@ $NetBSD$
return internal_syscall_ptr(SYSCALL(lstat), path, buf);
#elif SANITIZER_FREEBSD || SANITIZER_OPENBSD
return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, (uptr)buf,
-@@ -365,7 +480,14 @@ uptr internal_lstat(const char *path, vo
+@@ -368,7 +483,14 @@ uptr internal_lstat(const char *path, vo
}
uptr internal_fstat(fd_t fd, void *buf) {
@@ -225,7 +225,7 @@ $NetBSD$
SANITIZER_LINUX_USES_64BIT_SYSCALLS
#if SANITIZER_MIPS64 && !SANITIZER_NETBSD && !SANITIZER_OPENBSD
// For mips64, fstat syscall fills buffer in the format of kernel_stat
-@@ -392,7 +514,14 @@ uptr internal_filesize(fd_t fd) {
+@@ -395,7 +517,14 @@ uptr internal_filesize(fd_t fd) {
}
uptr internal_dup2(int oldfd, int newfd) {
@@ -241,7 +241,7 @@ $NetBSD$
return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0);
#else
return internal_syscall(SYSCALL(dup2), oldfd, newfd);
-@@ -400,7 +529,15 @@ uptr internal_dup2(int oldfd, int newfd)
+@@ -403,7 +532,15 @@ uptr internal_dup2(int oldfd, int newfd)
}
uptr internal_readlink(const char *path, char *buf, uptr bufsize) {
@@ -258,7 +258,7 @@ $NetBSD$
return internal_syscall(SYSCALL(readlinkat), AT_FDCWD, (uptr)path, (uptr)buf,
bufsize);
#elif SANITIZER_OPENBSD
-@@ -412,7 +549,14 @@ uptr internal_readlink(const char *path,
+@@ -415,7 +552,14 @@ uptr internal_readlink(const char *path,
}
uptr internal_unlink(const char *path) {
@@ -274,7 +274,7 @@ $NetBSD$
return internal_syscall(SYSCALL(unlinkat), AT_FDCWD, (uptr)path, 0);
#else
return internal_syscall_ptr(SYSCALL(unlink), (uptr)path);
-@@ -420,7 +564,15 @@ uptr internal_unlink(const char *path) {
+@@ -423,7 +567,15 @@ uptr internal_unlink(const char *path) {
}
uptr internal_rename(const char *oldpath, const char *newpath) {
@@ -291,7 +291,7 @@ $NetBSD$
return internal_syscall(SYSCALL(renameat), AT_FDCWD, (uptr)oldpath, AT_FDCWD,
(uptr)newpath);
#else
-@@ -429,11 +581,27 @@ uptr internal_rename(const char *oldpath
+@@ -432,11 +584,27 @@ uptr internal_rename(const char *oldpath
}
uptr internal_sched_yield() {
@@ -320,7 +320,7 @@ $NetBSD$
internal_syscall(SYSCALL(exit), exitcode);
#else
internal_syscall(SYSCALL(exit_group), exitcode);
-@@ -442,18 +610,38 @@ void internal__exit(int exitcode) {
+@@ -445,18 +613,38 @@ void internal__exit(int exitcode) {
}
unsigned int internal_sleep(unsigned int seconds) {
@@ -359,7 +359,7 @@ $NetBSD$
}
#endif // !SANITIZER_SOLARIS
-@@ -511,12 +699,32 @@ u64 NanoTime() {
+@@ -514,12 +702,32 @@ u64 NanoTime() {
kernel_timeval tv;
#endif
internal_memset(&tv, 0, sizeof(tv));
@@ -392,7 +392,7 @@ $NetBSD$
}
#endif // !SANITIZER_SOLARIS
-@@ -524,7 +732,7 @@ uptr internal_clock_gettime(__sanitizer_
+@@ -527,7 +735,7 @@ uptr internal_clock_gettime(__sanitizer_
// 'environ' array (on some others) and does not use libc. This function
// should be called first inside __asan_init.
const char *GetEnv(const char *name) {
@@ -401,20 +401,7 @@ $NetBSD$
SANITIZER_SOLARIS
if (::environ != 0) {
uptr NameLen = internal_strlen(name);
-@@ -645,10 +853,10 @@ void ReExec() {
- CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME,
- };
- char path[400];
-- size_t len;
-+ uptr len;
-
- len = sizeof(path);
-- if (sysctl(name, ARRAY_SIZE(name), path, &len, NULL, 0) != -1)
-+ if (internal_sysctl(name, ARRAY_SIZE(name), path, &len, NULL, 0) != -1)
- pathname = path;
- #elif SANITIZER_SOLARIS
- pathname = getexecname();
-@@ -763,20 +971,55 @@ uptr internal_ptrace(int request, int pi
+@@ -767,20 +975,55 @@ uptr internal_ptrace(int request, int pi
}
uptr internal_waitpid(int pid, int *status, int options) {
@@ -471,7 +458,7 @@ $NetBSD$
return internal_syscall(SYSCALL(getdirentries), fd, (uptr)dirp, count, NULL);
#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
return internal_syscall(SYSCALL(getdents64), fd, (uptr)dirp, count);
-@@ -787,6 +1030,14 @@ uptr internal_getdents(fd_t fd, struct l
+@@ -791,6 +1034,14 @@ uptr internal_getdents(fd_t fd, struct l
uptr internal_lseek(fd_t fd, OFF_T offset, int whence) {
#if SANITIZER_NETBSD
@@ -486,7 +473,7 @@ $NetBSD$
return internal_syscall64(SYSCALL(lseek), fd, 0, offset, whence);
#else
return internal_syscall(SYSCALL(lseek), fd, offset, whence);
-@@ -800,17 +1051,52 @@ uptr internal_prctl(int option, uptr arg
+@@ -804,11 +1055,28 @@ uptr internal_prctl(int option, uptr arg
#endif
uptr internal_sigaltstack(const void *ss, void *oss) {
@@ -516,31 +503,7 @@ $NetBSD$
return internal_syscall(SYSCALL(clone), SIGCHLD, 0);
#else
return internal_syscall(SYSCALL(fork));
- #endif
- }
-
-+#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_OPENBSD
-+int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
-+ uptr *oldlenp, const void *newp, uptr newlen) {
-+#if SANITIZER_NETBSD
-+ static int (*real_sysctl)(const int *a, unsigned int b, void *c, uptr *d,
-+ const void *e, uptr f) = NULL;
-+ if (!real_sysctl) {
-+ real_sysctl = (int(*)(const int *a, unsigned int b, void *c, uptr *d,
-+ const void *e, uptr f))GetRealLibcAddress("sysctl");
-+ }
-+ CHECK(real_sysctl);
-+ return (*real_sysctl)(name, namelen, oldp, oldlenp, newp, newlen);
-+#else
-+ return sysctl(name, namelen, oldp, oldlenp, newp, newlen);
-+#endif
-+}
-+#endif
-+
- #if SANITIZER_LINUX
- #define SA_RESTORER 0x04000000
- // Doesn't set sa_restorer if the caller did not set it, so use with caution
-@@ -880,7 +1166,15 @@ int internal_sigaction_syscall(int signu
+@@ -891,7 +1159,15 @@ int internal_sigaction_syscall(int signu
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
__sanitizer_sigset_t *oldset) {
@@ -557,31 +520,3 @@ $NetBSD$
return internal_syscall_ptr(SYSCALL(sigprocmask), how, set, oldset);
#else
__sanitizer_kernel_sigset_t *k_set = (__sanitizer_kernel_sigset_t *)set;
-@@ -1110,8 +1404,9 @@ uptr ReadBinaryName(/*out*/char *buf, up
- const int Mib[4] = {CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME};
- #endif
- const char *default_module_name = "kern.proc.pathname";
-- size_t Size = buf_len;
-- bool IsErr = (sysctl(Mib, ARRAY_SIZE(Mib), buf, &Size, NULL, 0) != 0);
-+ uptr Size = buf_len;
-+ bool IsErr = (internal_sysctl(Mib, ARRAY_SIZE(Mib), buf, &Size, NULL, 0)
-+ != 0);
- int readlink_error = IsErr ? errno : 0;
- uptr module_name_len = Size;
- #else
-@@ -1976,13 +2271,13 @@ void CheckASLR() {
- #if SANITIZER_NETBSD
- int mib[3];
- int paxflags;
-- size_t len = sizeof(paxflags);
-+ uptr len = sizeof(paxflags);
-
- mib[0] = CTL_PROC;
- mib[1] = internal_getpid();
- mib[2] = PROC_PID_PAXFLAGS;
-
-- if (UNLIKELY(sysctl(mib, 3, &paxflags, &len, NULL, 0) == -1)) {
-+ if (UNLIKELY(internal_sysctl(mib, 3, &paxflags, &len, NULL, 0) == -1)) {
- Printf("sysctl failed\n");
- Die();
- }
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc
index 87f50ce159..5d521c859b 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_linux_libcdep.cc.orig 2018-08-21 21:25:38.000000000 +0000
+--- lib/sanitizer_common/sanitizer_linux_libcdep.cc.orig 2018-08-31 08:13:43.283495237 +0000
+++ lib/sanitizer_common/sanitizer_linux_libcdep.cc
@@ -25,6 +25,7 @@
#include "sanitizer_freebsd.h"
@@ -10,16 +10,3 @@ $NetBSD$
#include "sanitizer_procmaps.h"
#include <dlfcn.h> // for dlsym()
-@@ -652,10 +653,10 @@ u32 GetNumberOfCPUs() {
- #if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_OPENBSD
- u32 ncpu;
- int req[2];
-- size_t len = sizeof(ncpu);
-+ uptr len = sizeof(ncpu);
- req[0] = CTL_HW;
- req[1] = HW_NCPU;
-- CHECK_EQ(sysctl(req, 2, &ncpu, &len, NULL, 0), 0);
-+ CHECK_EQ(internal_sysctl(req, 2, &ncpu, &len, NULL, 0), 0);
- return ncpu;
- #elif SANITIZER_ANDROID && !defined(CPU_COUNT) && !defined(__aarch64__)
- // Fall back to /sys/devices/system/cpu on Android when cpu_set_t doesn't
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__mac.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__mac.cc
deleted file mode 100644
index f558b44196..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__mac.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
---- lib/sanitizer_common/sanitizer_mac.cc.orig 2018-08-21 21:25:40.000000000 +0000
-+++ lib/sanitizer_common/sanitizer_mac.cc
-@@ -213,6 +213,11 @@ int internal_fork() {
- return fork();
- }
-
-+int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
-+ uptr *oldlenp, const void *newp, uptr newlen) {
-+ return sysctl(name, namelen, oldp, oldlenp, newp, newlen);
-+}
-+
- int internal_forkpty(int *amaster) {
- int master, slave;
- if (openpty(&master, &slave, nullptr, nullptr, nullptr) == -1) return -1;
-@@ -499,9 +504,9 @@ MacosVersion GetMacosVersionInternal() {
- uptr len = 0, maxlen = sizeof(version) / sizeof(version[0]);
- for (uptr i = 0; i < maxlen; i++) version[i] = '\0';
- // Get the version length.
-- CHECK_NE(sysctl(mib, 2, 0, &len, 0, 0), -1);
-+ CHECK_NE(internal_sysctl(mib, 2, 0, &len, 0, 0), -1);
- CHECK_LT(len, maxlen);
-- CHECK_NE(sysctl(mib, 2, version, &len, 0, 0), -1);
-+ CHECK_NE(internal_sysctl(mib, 2, version, &len, 0, 0), -1);
- switch (version[0]) {
- case '9': return MACOS_VERSION_LEOPARD;
- case '1': {
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__openbsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__openbsd.cc
index f0db9d2e18..e69de29bb2 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__openbsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__openbsd.cc
@@ -1,37 +0,0 @@
-$NetBSD$
-
---- lib/sanitizer_common/sanitizer_openbsd.cc.orig 2018-08-21 21:25:38.000000000 +0000
-+++ lib/sanitizer_common/sanitizer_openbsd.cc
-@@ -56,7 +56,7 @@ uptr ReadBinaryName(/*out*/char *buf, up
- struct kinfo_proc kp;
- size_t kl;
- const int Mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()};
-- if (sysctl(Mib, ARRAY_SIZE(Mib), &kp, &kl, NULL, 0) != -1)
-+ if (internal_sysctl(Mib, ARRAY_SIZE(Mib), &kp, &kl, NULL, 0) != -1)
- return internal_snprintf(buf,
- (KI_MAXCOMLEN < buf_len ? KI_MAXCOMLEN : buf_len),
- "%s", kp.p_comm);
-@@ -68,19 +68,19 @@ static void GetArgsAndEnv(char ***argv,
- size_t nenv;
- int argvmib[4] = {CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_ARGV};
- int envmib[4] = {CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_ENV};
-- if (sysctl(argvmib, 4, NULL, &nargv, NULL, 0) == -1) {
-+ if (internal_sysctl(argvmib, 4, NULL, &nargv, NULL, 0) == -1) {
- Printf("sysctl KERN_PROC_NARGV failed\n");
- Die();
- }
-- if (sysctl(envmib, 4, NULL, &nenv, NULL, 0) == -1) {
-+ if (internal_sysctl(envmib, 4, NULL, &nenv, NULL, 0) == -1) {
- Printf("sysctl KERN_PROC_NENV failed\n");
- Die();
- }
-- if (sysctl(argvmib, 4, &argv, &nargv, NULL, 0) == -1) {
-+ if (internal_sysctl(argvmib, 4, &argv, &nargv, NULL, 0) == -1) {
- Printf("sysctl KERN_PROC_ARGV failed\n");
- Die();
- }
-- if (sysctl(envmib, 4, &envp, &nenv, NULL, 0) == -1) {
-+ if (internal_sysctl(envmib, 4, &envp, &nenv, NULL, 0) == -1) {
- Printf("sysctl KERN_PROC_ENV failed\n");
- Die();
- }
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__posix.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__posix.h
deleted file mode 100644
index 2fc4343b25..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__posix.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- lib/sanitizer_common/sanitizer_posix.h.orig 2018-08-21 21:25:39.000000000 +0000
-+++ lib/sanitizer_common/sanitizer_posix.h
-@@ -60,6 +60,9 @@ uptr internal_waitpid(int pid, int *stat
- int internal_fork();
- int internal_forkpty(int *amaster);
-
-+int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
-+ uptr *oldlenp, const void *newp, uptr newlen);
-+
- // These functions call appropriate pthread_ functions directly, bypassing
- // the interceptor. They are weak and may not be present in some tools.
- SANITIZER_WEAK_ATTRIBUTE
Home |
Main Index |
Thread Index |
Old Index