pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-ubsan: Rebase to compiler-rt-git HEAD
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Fri Jul 7 09:51:15 2017 +0200
Changeset: 09a24c10086856661b2af889a398770c8886a446
Modified Files:
compiler-rt-ubsan/Makefile
compiler-rt-ubsan/distinfo
compiler-rt-ubsan/patches/patch-lib_sanitizer__common_CMakeLists.txt
compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__linux.cc
compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__netbsd.h
compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc
compiler-rt-ubsan/patches/patch-lib_ubsan_ubsan__platform.h
Removed Files:
compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__posix.cc
Log Message:
compiler-rt-ubsan: Rebase to compiler-rt-git HEAD
git-clang-format
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=09a24c10086856661b2af889a398770c8886a446
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-ubsan/Makefile | 2 +-
compiler-rt-ubsan/distinfo | 15 +++---
.../patch-lib_sanitizer__common_CMakeLists.txt | 4 +-
...patch-lib_sanitizer__common_sanitizer__linux.cc | 63 +++++++++++++---------
...patch-lib_sanitizer__common_sanitizer__netbsd.h | 2 +-
...r__common_sanitizer__platform__limits__posix.cc | 36 ++++++-------
...er__common_sanitizer__platform__limits__posix.h | 6 +--
...patch-lib_sanitizer__common_sanitizer__posix.cc | 15 ------
...anitizer__common_sanitizer__procmaps__netbsd.cc | 2 +-
.../patches/patch-lib_ubsan_ubsan__platform.h | 13 +++--
10 files changed, 79 insertions(+), 79 deletions(-)
diffs:
diff --git a/compiler-rt-ubsan/Makefile b/compiler-rt-ubsan/Makefile
index d83ff99c3d..b1b5e62ce0 100644
--- a/compiler-rt-ubsan/Makefile
+++ b/compiler-rt-ubsan/Makefile
@@ -5,7 +5,7 @@ CATEGORIES= lang devel
GIT_REPOSITORIES= compiler-rt
GIT_REPO.compiler-rt= https://github.com/llvm-mirror/compiler-rt.git
-GIT_REVISION.compiler-rt= 6ee59ff2a0b91f2224d38adb3fdb2dd5aefc107b
+GIT_REVISION.compiler-rt= 9e2c69ffc25e56881e2a4805ac765110dec265dc
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://compiler-rt.llvm.org/
diff --git a/compiler-rt-ubsan/distinfo b/compiler-rt-ubsan/distinfo
index 6a8c897bdc..7243060e56 100644
--- a/compiler-rt-ubsan/distinfo
+++ b/compiler-rt-ubsan/distinfo
@@ -16,21 +16,20 @@ SHA1 (patch-cmake_config-ix.cmake) = d0b0de34e0e4ff5feb262dac19a78082e0afc921
SHA1 (patch-lib_interception_interception.h) = e6826deb85420ac5c7d9594d5d4364767d22389f
SHA1 (patch-lib_interception_interception__linux.cc) = 9748f01fb3621c51197a435422e658b9f694dc01
SHA1 (patch-lib_interception_interception__linux.h) = 8ab24466d85d19d0c5dd35c5867a7cc958009143
-SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = a563a3b1c04ae343dc7c6646a846f48b96c9e8de
+SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = 2ffbb5737ae8cfb230e12eed87e38c209311168e
SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 3e2f5c06d54209d981835d11e272f7cff9086ffb
SHA1 (patch-lib_sanitizer__common_sanitizer__libignore.cc) = 57eb2b213bd0eb664524aa0e047d5e73d4956ad2
-SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = dc5bd14b37758e9197d3a8022f5d4a24bf26642a
+SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = 1a158f3d3d20f3f59a8cbb62790dec58c24ed902
SHA1 (patch-lib_sanitizer__common_sanitizer__linux.h) = bdec0460d99a5f05b6e54d075032ead845a1c984
SHA1 (patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc) = b9bf8727fe9bf471e749c2176829f7b9a74c2be9
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd.h) = a4b6a100cbff1d35c4bf40b49b555062cc1bfbaa
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd.h) = 851d900d3edad48af9e325945830022f7f346438
SHA1 (patch-lib_sanitizer__common_sanitizer__platform.h) = ffb31dccce9824c81f3686de47c4b1e79bda3e1e
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = b985ae53dafddfc5b4112eae65cab49176fc1989
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = 216496ec38f40a1c1d6905e006039860c4c1d48d
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 3f2b057d66ee112fd2cb3a198630ed51b255b57a
-SHA1 (patch-lib_sanitizer__common_sanitizer__posix.cc) = a561675ba1a7ef3b71d5c0af6521fb6a0f91f205
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = 9093a94b1ebc727c83cc169edc1bf6996e05dc17
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 78f0ee62291b5f43ca68da577017e3aef7d83f7a
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps.h) = 2bc9a7c32f0a7d18fe4d0d465b9b42547abbd989
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__common.cc) = 5a407e496f92dfd2dd78a3b2582d7c695e2547fb
-SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc) = 83f8088cb990ebc5a85e319f1d4990d04196d67a
+SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc) = 67e12a7c98a520f9fca9c6970a1e009d726aa5d6
SHA1 (patch-lib_sanitizer__common_sanitizer__syscall__generic.inc) = b9ab90fafcb14d589e02a2062fe7e978d6b7edbb
SHA1 (patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc) = cf7e016fff0f57e7bcae93696ec05e5cff7b7093
-SHA1 (patch-lib_ubsan_ubsan__platform.h) = ad100673aac54c2bbc29e6084cfa5010359e5791
+SHA1 (patch-lib_ubsan_ubsan__platform.h) = 5714b6b7cde91828375ad25fee1c8b9a8e9a200d
diff --git a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_CMakeLists.txt b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_CMakeLists.txt
index 27f2c14464..7fc326b105 100644
--- a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_CMakeLists.txt
+++ b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_CMakeLists.txt
@@ -1,8 +1,8 @@
$NetBSD$
---- lib/sanitizer_common/CMakeLists.txt.orig 2017-07-03 15:33:06.000000000 +0000
+--- lib/sanitizer_common/CMakeLists.txt.orig 2017-07-07 07:44:02.472208766 +0000
+++ lib/sanitizer_common/CMakeLists.txt
-@@ -22,6 +22,7 @@ set(SANITIZER_SOURCES_NOTERMINATION
+@@ -23,6 +23,7 @@ set(SANITIZER_SOURCES_NOTERMINATION
sanitizer_procmaps_freebsd.cc
sanitizer_procmaps_linux.cc
sanitizer_procmaps_mac.cc
diff --git a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__linux.cc b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__linux.cc
index 51d205ea50..7f63b47a97 100644
--- a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__linux.cc
+++ b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__linux.cc
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_linux.cc.orig 2017-07-03 15:33:06.000000000 +0000
+--- lib/sanitizer_common/sanitizer_linux.cc.orig 2017-07-07 07:44:02.473579496 +0000
+++ lib/sanitizer_common/sanitizer_linux.cc
@@ -14,7 +14,7 @@
@@ -27,7 +27,7 @@ $NetBSD$
// For mips64, syscall(__NR_stat) fills the buffer in the 'struct kernel_stat'
// format. Struct kernel_stat is defined as 'struct stat' in asm/stat.h. To
// access stat from asm/stat.h, without conflicting with definition in
-@@ -71,6 +75,12 @@ extern "C" {
+@@ -79,6 +83,12 @@ extern "C" {
extern char **environ; // provided by crt1
#endif // SANITIZER_FREEBSD
@@ -40,7 +40,7 @@ $NetBSD$
#if !SANITIZER_ANDROID
#include <sys/signal.h>
#endif
-@@ -131,7 +141,10 @@ namespace __sanitizer {
+@@ -139,7 +149,10 @@ namespace __sanitizer {
#if !SANITIZER_S390
uptr internal_mmap(void *addr, uptr length, int prot, int flags, int fd,
OFF_T offset) {
@@ -52,11 +52,11 @@ $NetBSD$
return internal_syscall(SYSCALL(mmap), (uptr)addr, length, prot, flags, fd,
offset);
#else
-@@ -174,26 +187,39 @@ uptr internal_open(const char *filename,
+@@ -182,26 +195,39 @@ uptr internal_open(const char *filename,
uptr internal_read(fd_t fd, void *buf, uptr count) {
sptr res;
-+#ifdef SANITIZER_NETBSD
++#if SANITIZER_NETBSD
+ HANDLE_EINTR(res, internal_syscall_ptr(SYSCALL(read), fd, buf, count));
+#else
HANDLE_EINTR(res, (sptr)internal_syscall(SYSCALL(read), fd, (uptr)buf,
@@ -67,7 +67,7 @@ $NetBSD$
uptr internal_write(fd_t fd, const void *buf, uptr count) {
sptr res;
-+#ifdef SANITIZER_NETBSD
++#if SANITIZER_NETBSD
+ HANDLE_EINTR(res, internal_syscall_ptr(SYSCALL(write), fd, buf, count));
+#else
HANDLE_EINTR(res, (sptr)internal_syscall(SYSCALL(write), fd, (uptr)buf,
@@ -78,7 +78,7 @@ $NetBSD$
uptr internal_ftruncate(fd_t fd, uptr size) {
sptr res;
-+#ifdef SANITIZER_NETBSD
++#if SANITIZER_NETBSD
+ HANDLE_EINTR(res, internal_syscall(SYSCALL(ftruncate), fd, 0, (s64)size));
+#else
HANDLE_EINTR(res, (sptr)internal_syscall(SYSCALL(ftruncate), fd,
@@ -93,7 +93,7 @@ $NetBSD$
static void stat64_to_stat(struct stat64 *in, struct stat *out) {
internal_memset(out, 0, sizeof(*out));
out->st_dev = in->st_dev;
-@@ -234,7 +260,7 @@ static void kernel_stat_to_stat(struct k
+@@ -242,7 +268,7 @@ static void kernel_stat_to_stat(struct k
#endif
uptr internal_stat(const char *path, void *buf) {
@@ -102,7 +102,7 @@ $NetBSD$
return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path,
(uptr)buf, 0);
#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
-@@ -259,7 +285,9 @@ uptr internal_stat(const char *path, voi
+@@ -267,7 +293,9 @@ uptr internal_stat(const char *path, voi
}
uptr internal_lstat(const char *path, void *buf) {
@@ -113,7 +113,7 @@ $NetBSD$
return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path,
(uptr)buf, AT_SYMLINK_NOFOLLOW);
#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
-@@ -284,7 +312,7 @@ uptr internal_lstat(const char *path, vo
+@@ -292,7 +320,7 @@ uptr internal_lstat(const char *path, vo
}
uptr internal_fstat(fd_t fd, void *buf) {
@@ -122,7 +122,7 @@ $NetBSD$
# if SANITIZER_MIPS64
// For mips64, fstat syscall fills buffer in the format of kernel_stat
struct kernel_stat kbuf;
-@@ -318,7 +346,9 @@ uptr internal_dup2(int oldfd, int newfd)
+@@ -326,7 +354,9 @@ uptr internal_dup2(int oldfd, int newfd)
}
uptr internal_readlink(const char *path, char *buf, uptr bufsize) {
@@ -133,7 +133,7 @@ $NetBSD$
return internal_syscall(SYSCALL(readlinkat), AT_FDCWD,
(uptr)path, (uptr)buf, bufsize);
#else
-@@ -348,7 +378,7 @@ uptr internal_sched_yield() {
+@@ -356,7 +386,7 @@ uptr internal_sched_yield() {
}
void internal__exit(int exitcode) {
@@ -142,7 +142,7 @@ $NetBSD$
internal_syscall(SYSCALL(exit), exitcode);
#else
internal_syscall(SYSCALL(exit_group), exitcode);
-@@ -387,19 +417,25 @@ bool FileExists(const char *filename) {
+@@ -395,19 +425,25 @@ bool FileExists(const char *filename) {
tid_t GetTid() {
#if SANITIZER_FREEBSD
return (uptr)pthread_self();
@@ -169,7 +169,7 @@ $NetBSD$
return (u64)tv.tv_sec * 1000*1000*1000 + tv.tv_usec * 1000;
}
-@@ -407,7 +443,7 @@ u64 NanoTime() {
+@@ -415,7 +451,7 @@ u64 NanoTime() {
// 'environ' array (on FreeBSD) and does not use libc. This function should be
// called first inside __asan_init.
const char *GetEnv(const char *name) {
@@ -178,7 +178,7 @@ $NetBSD$
if (::environ != 0) {
uptr NameLen = internal_strlen(name);
for (char **Env = ::environ; *Env != 0; Env++) {
-@@ -541,6 +577,8 @@ void BlockingMutex::Lock() {
+@@ -549,6 +585,8 @@ void BlockingMutex::Lock() {
while (atomic_exchange(m, MtxSleeping, memory_order_acquire) != MtxUnlocked) {
#if SANITIZER_FREEBSD
_umtx_op(m, UMTX_OP_WAIT_UINT, MtxSleeping, 0, 0);
@@ -187,7 +187,7 @@ $NetBSD$
#else
internal_syscall(SYSCALL(futex), (uptr)m, FUTEX_WAIT, MtxSleeping, 0, 0, 0);
#endif
-@@ -554,6 +592,8 @@ void BlockingMutex::Unlock() {
+@@ -562,6 +600,8 @@ void BlockingMutex::Unlock() {
if (v == MtxSleeping) {
#if SANITIZER_FREEBSD
_umtx_op(m, UMTX_OP_WAKE, 1, 0, 0);
@@ -196,7 +196,7 @@ $NetBSD$
#else
internal_syscall(SYSCALL(futex), (uptr)m, FUTEX_WAKE, 1, 0, 0, 0);
#endif
-@@ -569,6 +609,17 @@ void BlockingMutex::CheckLocked() {
+@@ -577,6 +617,17 @@ void BlockingMutex::CheckLocked() {
// The actual size of this structure is specified by d_reclen.
// Note that getdents64 uses a different structure format. We only provide the
// 32-bit syscall here.
@@ -214,7 +214,7 @@ $NetBSD$
struct linux_dirent {
#if SANITIZER_X32 || defined(__aarch64__)
u64 d_ino;
-@@ -583,16 +634,34 @@ struct linux_dirent {
+@@ -591,16 +642,34 @@ struct linux_dirent {
#endif
char d_name[256];
};
@@ -249,7 +249,7 @@ $NetBSD$
}
uptr internal_getpid() {
-@@ -604,7 +673,9 @@ uptr internal_getppid() {
+@@ -612,7 +681,9 @@ uptr internal_getppid() {
}
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count) {
@@ -260,7 +260,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);
-@@ -614,7 +685,11 @@ uptr internal_getdents(fd_t fd, struct l
+@@ -622,7 +693,11 @@ uptr internal_getdents(fd_t fd, struct l
}
uptr internal_lseek(fd_t fd, OFF_T offset, int whence) {
@@ -272,7 +272,7 @@ $NetBSD$
}
#if SANITIZER_LINUX
-@@ -706,7 +781,7 @@ int internal_sigaction_syscall(int signu
+@@ -714,7 +789,7 @@ int internal_sigaction_syscall(int signu
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
__sanitizer_sigset_t *oldset) {
@@ -281,7 +281,18 @@ $NetBSD$
return internal_syscall(SYSCALL(sigprocmask), how, set, oldset);
#else
__sanitizer_kernel_sigset_t *k_set = (__sanitizer_kernel_sigset_t *)set;
-@@ -829,8 +904,12 @@ uptr GetPageSize() {
+@@ -863,7 +938,9 @@ static uptr GetKernelAreaSize() {
+ #endif // SANITIZER_WORDSIZE == 32
+
+ uptr GetMaxVirtualAddress() {
+-#if SANITIZER_WORDSIZE == 64
++#if SANITIZER_NETBSD && defined(__x86_64__)
++ return 0x7f7ffffff000ULL; // (0x00007f8000000000 - PAGE_SIZE)
++#elif SANITIZER_WORDSIZE == 64
+ # if defined(__powerpc64__) || defined(__aarch64__)
+ // On PowerPC64 we have two different address space layouts: 44- and 46-bit.
+ // We somehow need to figure out which one we are using now and choose
+@@ -907,8 +984,12 @@ uptr GetPageSize() {
}
uptr ReadBinaryName(/*out*/char *buf, uptr buf_len) {
@@ -295,7 +306,7 @@ $NetBSD$
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);
-@@ -1474,6 +1553,8 @@ SignalContext::WriteFlag SignalContext::
+@@ -1552,6 +1633,8 @@ SignalContext::WriteFlag SignalContext::
static const uptr PF_WRITE = 1U << 1;
#if SANITIZER_FREEBSD
uptr err = ucontext->uc_mcontext.mc_err;
@@ -304,7 +315,7 @@ $NetBSD$
#else
uptr err = ucontext->uc_mcontext.gregs[REG_ERR];
#endif
-@@ -1520,6 +1601,11 @@ void GetPcSpBp(void *context, uptr *pc,
+@@ -1598,6 +1681,11 @@ void GetPcSpBp(void *context, uptr *pc,
*pc = ucontext->uc_mcontext.mc_rip;
*bp = ucontext->uc_mcontext.mc_rbp;
*sp = ucontext->uc_mcontext.mc_rsp;
@@ -316,7 +327,7 @@ $NetBSD$
# else
ucontext_t *ucontext = (ucontext_t*)context;
*pc = ucontext->uc_mcontext.gregs[REG_RIP];
-@@ -1532,6 +1618,11 @@ void GetPcSpBp(void *context, uptr *pc,
+@@ -1610,6 +1698,11 @@ void GetPcSpBp(void *context, uptr *pc,
*pc = ucontext->uc_mcontext.mc_eip;
*bp = ucontext->uc_mcontext.mc_ebp;
*sp = ucontext->uc_mcontext.mc_esp;
@@ -328,7 +339,7 @@ $NetBSD$
# else
ucontext_t *ucontext = (ucontext_t*)context;
*pc = ucontext->uc_mcontext.gregs[REG_EIP];
-@@ -1632,4 +1723,4 @@ bool GetRandom(void *buffer, uptr length
+@@ -1710,4 +1803,4 @@ bool GetRandom(void *buffer, uptr length
} // namespace __sanitizer
diff --git a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__netbsd.h b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__netbsd.h
index 383e3ac780..37bfd9ea09 100644
--- a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__netbsd.h
+++ b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__netbsd.h
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_netbsd.h.orig 2017-07-03 18:33:56.808690628 +0000
+--- lib/sanitizer_common/sanitizer_netbsd.h.orig 2017-07-07 07:50:25.380441934 +0000
+++ lib/sanitizer_common/sanitizer_netbsd.h
@@ -0,0 +1,20 @@
+//===-- sanitizer_freebsd.h -------------------------------------*- C++ -*-===//
diff --git a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
index 025227704f..5534e22434 100644
--- a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
+++ b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_limits_posix.cc.orig 2017-07-03 15:33:06.000000000 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_posix.cc.orig 2017-07-07 07:44:02.474052842 +0000
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -14,7 +14,7 @@
@@ -11,7 +11,7 @@ $NetBSD$
// Tests in this file assume that off_t-dependent data structures match the
// libc ABI. For example, struct dirent here is what readdir() function (as
// exported from libc) returns, and not the user-facing "dirent", which
-@@ -79,7 +79,7 @@
+@@ -78,7 +78,7 @@
#include <net/if_arp.h>
#endif
@@ -20,7 +20,7 @@ $NetBSD$
# include <sys/mount.h>
# include <sys/sockio.h>
# include <sys/socket.h>
-@@ -94,16 +94,18 @@
+@@ -93,16 +93,18 @@
# include <sys/statvfs.h>
# include <sys/soundcard.h>
# include <sys/mtio.h>
@@ -43,7 +43,7 @@ $NetBSD$
#define _KERNEL // to declare 'shminfo' structure
# include <sys/shm.h>
#undef _KERNEL
-@@ -111,11 +113,19 @@
+@@ -110,11 +112,19 @@
#undef INLINE // to avoid clashes with sanitizers' definitions
#endif
@@ -65,7 +65,7 @@ $NetBSD$
# include <utime.h>
# include <sys/ptrace.h>
# if defined(__mips64) || defined(__aarch64__) || defined(__arm__)
-@@ -200,9 +210,9 @@ typedef struct user_fpregs elf_fpregset_
+@@ -199,9 +209,9 @@ typedef struct user_fpregs elf_fpregset_
namespace __sanitizer {
unsigned struct_utsname_sz = sizeof(struct utsname);
unsigned struct_stat_sz = sizeof(struct stat);
@@ -77,7 +77,7 @@ $NetBSD$
unsigned struct_rusage_sz = sizeof(struct rusage);
unsigned struct_tm_sz = sizeof(struct tm);
unsigned struct_passwd_sz = sizeof(struct passwd);
-@@ -245,12 +255,12 @@ namespace __sanitizer {
+@@ -244,12 +254,12 @@ namespace __sanitizer {
unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname);
#endif // SANITIZER_LINUX
@@ -92,7 +92,7 @@ $NetBSD$
#if SANITIZER_LINUX && !SANITIZER_ANDROID
unsigned struct_ustat_sz = sizeof(struct ustat);
-@@ -258,12 +268,14 @@ namespace __sanitizer {
+@@ -257,12 +267,14 @@ namespace __sanitizer {
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
@@ -109,7 +109,7 @@ $NetBSD$
uptr sig_ign = (uptr)SIG_IGN;
uptr sig_dfl = (uptr)SIG_DFL;
-@@ -273,10 +285,17 @@ namespace __sanitizer {
+@@ -272,10 +284,17 @@ namespace __sanitizer {
int e_tabsz = (int)E_TABSZ;
#endif
@@ -129,7 +129,7 @@ $NetBSD$
int shmctl_ipc_stat = (int)IPC_STAT;
int shmctl_ipc_info = (int)IPC_INFO;
int shmctl_shm_info = (int)SHM_INFO;
-@@ -310,9 +329,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -309,9 +328,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
#endif
@@ -143,7 +143,7 @@ $NetBSD$
#endif
#if SANITIZER_LINUX && !SANITIZER_ANDROID && \
-@@ -452,7 +472,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -451,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
unsigned struct_synth_info_sz = sizeof(struct synth_info);
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
@@ -152,7 +152,7 @@ $NetBSD$
#if SANITIZER_LINUX && !SANITIZER_ANDROID
unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
-@@ -479,7 +499,8 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -478,7 +498,8 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
unsigned struct_unimapinit_sz = sizeof(struct unimapinit);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
@@ -162,7 +162,7 @@ $NetBSD$
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
#endif // (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-@@ -535,7 +556,8 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -534,7 +555,8 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
unsigned IOCTL_TIOCSPGRP = TIOCSPGRP;
unsigned IOCTL_TIOCSTI = TIOCSTI;
unsigned IOCTL_TIOCSWINSZ = TIOCSWINSZ;
@@ -172,7 +172,7 @@ $NetBSD$
unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;
unsigned IOCTL_SIOCGETVIFCNT = SIOCGETVIFCNT;
#endif
-@@ -975,7 +997,7 @@ COMPILER_CHECK(IOC_NR(0x12345678) == _IO
+@@ -966,7 +988,7 @@ COMPILER_CHECK(IOC_NR(0x12345678) == _IO
COMPILER_CHECK(IOC_TYPE(0x12345678) == _IOC_TYPE(0x12345678));
#endif // SANITIZER_LINUX
@@ -181,7 +181,7 @@ $NetBSD$
// There are more undocumented fields in dl_phdr_info that we are not interested
// in.
COMPILER_CHECK(sizeof(__sanitizer_dl_phdr_info) <= sizeof(dl_phdr_info));
-@@ -983,9 +1005,10 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi
+@@ -974,9 +996,10 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi
CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_name);
CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
@@ -194,7 +194,7 @@ $NetBSD$
CHECK_TYPE_SIZE(glob_t);
CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
-@@ -1037,7 +1060,7 @@ COMPILER_CHECK(sizeof(__sanitizer_dirent
+@@ -1028,7 +1051,7 @@ COMPILER_CHECK(sizeof(__sanitizer_dirent
CHECK_SIZE_AND_OFFSET(dirent, d_ino);
#if SANITIZER_MAC
CHECK_SIZE_AND_OFFSET(dirent, d_seekoff);
@@ -203,7 +203,7 @@ $NetBSD$
// There is no 'd_off' field on FreeBSD.
#else
CHECK_SIZE_AND_OFFSET(dirent, d_off);
-@@ -1134,11 +1157,15 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno
+@@ -1125,11 +1148,15 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno
CHECK_TYPE_SIZE(ether_addr);
@@ -220,7 +220,7 @@ $NetBSD$
# else
CHECK_SIZE_AND_OFFSET(ipc_perm, __key);
CHECK_SIZE_AND_OFFSET(ipc_perm, __seq);
-@@ -1175,20 +1202,20 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_next)
+@@ -1166,20 +1193,20 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_next)
CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_name);
CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_addr);
CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_netmask);
@@ -244,7 +244,7 @@ $NetBSD$
#else
CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
#endif // SANITIZER_LINUX
-@@ -1289,4 +1316,5 @@ CHECK_TYPE_SIZE(sem_t);
+@@ -1280,4 +1307,5 @@ CHECK_TYPE_SIZE(sem_t);
COMPILER_CHECK(ARM_VFPREGS_SIZE == ARM_VFPREGS_SIZE_ASAN);
#endif
diff --git a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
index 7e939d6a26..8f6bc9a3a0 100644
--- a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
+++ b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_limits_posix.h.orig 2017-07-03 15:33:06.000000000 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_posix.h.orig 2017-07-07 07:44:02.474288555 +0000
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -18,18 +18,31 @@
#include "sanitizer_internal_defs.h"
@@ -696,5 +696,5 @@ $NetBSD$
#endif
+#endif
- extern const int errno_EINVAL;
- extern const int errno_EOWNERDEAD;
+ extern const int si_SEGV_MAPERR;
+ extern const int si_SEGV_ACCERR;
diff --git a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__posix.cc b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__posix.cc
deleted file mode 100644
index 81b0723bb6..0000000000
--- a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__posix.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- lib/sanitizer_common/sanitizer_posix.cc.orig 2017-07-03 15:33:07.000000000 +0000
-+++ lib/sanitizer_common/sanitizer_posix.cc
-@@ -90,7 +90,9 @@ static uptr GetKernelAreaSize() {
-
- uptr GetMaxVirtualAddress() {
- #if SANITIZER_WORDSIZE == 64
--# if defined(__aarch64__) && SANITIZER_IOS && !SANITIZER_IOSSIM
-+# if SANITIZER_NETBSD && defined(__x86_64__)
-+ return 0x7f7ffffff000ULL; // (0x00007f8000000000 - PAGE_SIZE)
-+# elif defined(__aarch64__) && SANITIZER_IOS && !SANITIZER_IOSSIM
- // Ideally, we would derive the upper bound from MACH_VM_MAX_ADDRESS. The
- // upper bound can change depending on the device.
- return 0x200000000 - 1;
diff --git a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc
index 97130d4617..70cddb2dba 100644
--- a/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc
+++ b/compiler-rt-ubsan/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_procmaps_netbsd.cc.orig 2017-07-03 18:33:56.810198571 +0000
+--- lib/sanitizer_common/sanitizer_procmaps_netbsd.cc.orig 2017-07-07 07:50:25.382444345 +0000
+++ lib/sanitizer_common/sanitizer_procmaps_netbsd.cc
@@ -0,0 +1,78 @@
+//===-- sanitizer_procmaps_freebsd.cc -------------------------------------===//
diff --git a/compiler-rt-ubsan/patches/patch-lib_ubsan_ubsan__platform.h b/compiler-rt-ubsan/patches/patch-lib_ubsan_ubsan__platform.h
index be04403959..b849ff199f 100644
--- a/compiler-rt-ubsan/patches/patch-lib_ubsan_ubsan__platform.h
+++ b/compiler-rt-ubsan/patches/patch-lib_ubsan_ubsan__platform.h
@@ -2,12 +2,17 @@ $NetBSD$
--- lib/ubsan/ubsan_platform.h.orig 2017-07-03 15:33:06.000000000 +0000
+++ lib/ubsan/ubsan_platform.h
-@@ -14,7 +14,7 @@
+@@ -14,9 +14,10 @@
#define UBSAN_PLATFORM_H
// Other platforms should be easy to add, and probably work as-is.
-#if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) && \
-+#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)) && \
- (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
- defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \
+- (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
+- defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
++ defined(__APPLE__)) && \
++ (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
++ defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \
defined(__s390__))
+ # define CAN_SANITIZE_UB 1
+ #elif defined(_WIN32)
Home |
Main Index |
Thread Index |
Old Index