pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-git: Drop local patches
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Tue Aug 29 00:08:50 2017 +0200
Changeset: cd811dc08c783f2948de37c78d692edc1e87919c
Modified Files:
compiler-rt-git/distinfo
Removed Files:
compiler-rt-git/patches/patch-lib_asan_asan__mapping.h
compiler-rt-git/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
compiler-rt-git/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
Log Message:
compiler-rt-git: Drop local patches
All merged upstream.
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=cd811dc08c783f2948de37c78d692edc1e87919c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-git/distinfo | 3 -
.../patches/patch-lib_asan_asan__mapping.h | 37 --
...r__common_sanitizer__platform__limits__posix.cc | 253 ---------
...er__common_sanitizer__platform__limits__posix.h | 587 ---------------------
4 files changed, 880 deletions(-)
diffs:
diff --git a/compiler-rt-git/distinfo b/compiler-rt-git/distinfo
index 7e87528e56..7931384fd5 100644
--- a/compiler-rt-git/distinfo
+++ b/compiler-rt-git/distinfo
@@ -12,6 +12,3 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
-SHA1 (patch-lib_asan_asan__mapping.h) = 73f5f33e946868b4780864e633916376b11b16f1
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = 36a89517584891a1a50536a681a5d42e99ef904d
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 7ae546fe4c5fada950a8e06c73f7ac0e5ba81924
diff --git a/compiler-rt-git/patches/patch-lib_asan_asan__mapping.h b/compiler-rt-git/patches/patch-lib_asan_asan__mapping.h
deleted file mode 100644
index 0d32f9db69..0000000000
--- a/compiler-rt-git/patches/patch-lib_asan_asan__mapping.h
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD$
-
---- lib/asan/asan_mapping.h.orig 2017-07-03 15:33:06.000000000 +0000
-+++ lib/asan/asan_mapping.h
-@@ -115,6 +115,13 @@
- // || `[0x40000000, 0x47ffffff]` || LowShadow ||
- // || `[0x00000000, 0x3fffffff]` || LowMem ||
- //
-+// Shadow mapping on NetBSD/x86-64 with SHADOW_OFFSET == 0x400000000000:
-+// || `[0x4feffffffe01, 0x7f7ffffff000]` || HighMem ||
-+// || `[0x49fdffffffc0, 0x4feffffffe00]` || HighShadow ||
-+// || `[0x480000000000, 0x49fdffffffbf]` || ShadowGap ||
-+// || `[0x400000000000, 0x47ffffffffff]` || LowShadow ||
-+// || `[0x000000000000, 0x3fffffffffff]` || LowMem ||
-+//
- // Default Windows/i386 mapping:
- // (the exact location of HighShadow/HighMem may vary depending
- // on WoW64, /LARGEADDRESSAWARE, etc).
-@@ -140,6 +147,7 @@ static const u64 kPPC64_ShadowOffset64 =
- static const u64 kSystemZ_ShadowOffset64 = 1ULL << 52;
- static const u64 kFreeBSD_ShadowOffset32 = 1ULL << 30; // 0x40000000
- static const u64 kFreeBSD_ShadowOffset64 = 1ULL << 46; // 0x400000000000
-+static const u64 kNetBSD_ShadowOffset64 = 1ULL << 46; // 0x400000000000
- static const u64 kWindowsShadowOffset32 = 3ULL << 28; // 0x30000000
-
- #define SHADOW_SCALE kDefaultShadowScale
-@@ -176,8 +184,8 @@ static const u64 kWindowsShadowOffset32
- # define SHADOW_OFFSET kPPC64_ShadowOffset64
- # elif defined(__s390x__)
- # define SHADOW_OFFSET kSystemZ_ShadowOffset64
--# elif SANITIZER_FREEBSD
--# define SHADOW_OFFSET kFreeBSD_ShadowOffset64
-+# elif SANITIZER_NETBSD
-+# define SHADOW_OFFSET kNetBSD_ShadowOffset64
- # elif SANITIZER_MAC
- # define SHADOW_OFFSET kDefaultShadowOffset64
- # elif defined(__mips64)
diff --git a/compiler-rt-git/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc b/compiler-rt-git/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
deleted file mode 100644
index b6fd1aad26..0000000000
--- a/compiler-rt-git/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
+++ /dev/null
@@ -1,253 +0,0 @@
-$NetBSD$
-
---- lib/sanitizer_common/sanitizer_platform_limits_posix.cc.orig 2017-07-16 22:40:10.000000000 +0000
-+++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc
-@@ -14,7 +14,7 @@
-
- #include "sanitizer_platform.h"
-
--#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC || SANITIZER_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
-@@ -78,7 +78,7 @@
- #include <net/if_arp.h>
- #endif
-
--#if SANITIZER_FREEBSD
-+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
- # include <sys/mount.h>
- # include <sys/sockio.h>
- # include <sys/socket.h>
-@@ -93,16 +93,18 @@
- # include <sys/statvfs.h>
- # include <sys/soundcard.h>
- # include <sys/mtio.h>
--# include <sys/consio.h>
--# include <sys/kbio.h>
--# include <sys/link_elf.h>
- # include <netinet/ip_mroute.h>
- # include <netinet/in.h>
--# include <net/ethernet.h>
- # include <net/ppp_defs.h>
- # include <glob.h>
- # include <term.h>
-+#endif
-
-+#if SANITIZER_FREEBSD
-+#include <net/ethernet.h>
-+#include <sys/consio.h>
-+#include <sys/kbio.h>
-+#include <sys/link_elf.h>
- #define _KERNEL // to declare 'shminfo' structure
- # include <sys/shm.h>
- #undef _KERNEL
-@@ -110,11 +112,19 @@
- #undef INLINE // to avoid clashes with sanitizers' definitions
- #endif
-
--#if SANITIZER_FREEBSD || SANITIZER_IOS
-+#if SANITIZER_NETBSD
-+#include <link_elf.h>
-+#include <net/if_ether.h>
-+#include <sys/shm.h>
-+#define statfs statvfs
-+#define d_ino d_fileno
-+#endif
-+
-+#if SANITIZER_FREEBSD || SANITIZER_IOS || SANITIZER_NETBSD
- #undef IOC_DIRMASK
- #endif
-
--#if SANITIZER_LINUX || SANITIZER_FREEBSD
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
- # include <utime.h>
- # include <sys/ptrace.h>
- # if defined(__mips64) || defined(__aarch64__) || defined(__arm__)
-@@ -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);
--#if !SANITIZER_IOS && !SANITIZER_FREEBSD
-+#if !SANITIZER_IOS && !SANITIZER_FREEBSD && !SANITIZER_NETBSD
- unsigned struct_stat64_sz = sizeof(struct stat64);
--#endif // !SANITIZER_IOS && !SANITIZER_FREEBSD
-+#endif // !SANITIZER_IOS && !SANITIZER_FREEBSD && !SANITIZER_NETBSD
- unsigned struct_rusage_sz = sizeof(struct rusage);
- unsigned struct_tm_sz = sizeof(struct tm);
- unsigned struct_passwd_sz = sizeof(struct passwd);
-@@ -244,12 +254,12 @@ namespace __sanitizer {
- unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname);
- #endif // SANITIZER_LINUX
-
--#if SANITIZER_LINUX || SANITIZER_FREEBSD
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
- unsigned struct_rlimit_sz = sizeof(struct rlimit);
- unsigned struct_timespec_sz = sizeof(struct timespec);
- unsigned struct_utimbuf_sz = sizeof(struct utimbuf);
- unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
--#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- unsigned struct_ustat_sz = sizeof(struct ustat);
-@@ -257,12 +267,14 @@ namespace __sanitizer {
- unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
- #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- unsigned struct_timex_sz = sizeof(struct timex);
- unsigned struct_msqid_ds_sz = sizeof(struct msqid_ds);
- unsigned struct_mq_attr_sz = sizeof(struct mq_attr);
- unsigned struct_statvfs_sz = sizeof(struct statvfs);
--#endif // (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#endif // (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) &&
-+ // !SANITIZER_ANDROID
-
- uptr sig_ign = (uptr)SIG_IGN;
- uptr sig_dfl = (uptr)SIG_DFL;
-@@ -272,10 +284,17 @@ namespace __sanitizer {
- int e_tabsz = (int)E_TABSZ;
- #endif
-
--
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- unsigned struct_shminfo_sz = sizeof(struct shminfo);
-+#if !SANITIZER_NETBSD
- unsigned struct_shm_info_sz = sizeof(struct shm_info);
-+#else
-+#define IPC_INFO -1
-+#define SHM_INFO -1
-+#define SHM_STAT -1
-+ unsigned struct_shm_info_sz = -1;
-+#endif
- int shmctl_ipc_stat = (int)IPC_STAT;
- int shmctl_ipc_info = (int)IPC_INFO;
- int shmctl_shm_info = (int)SHM_INFO;
-@@ -309,9 +328,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
- unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
- #endif
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-- int glob_nomatch = GLOB_NOMATCH;
-- int glob_altdirfunc = GLOB_ALTDIRFUNC;
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
-+int glob_nomatch = GLOB_NOMATCH;
-+int glob_altdirfunc = GLOB_ALTDIRFUNC;
- #endif
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID && \
-@@ -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);
--#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
-@@ -478,7 +498,8 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
- unsigned struct_unimapinit_sz = sizeof(struct unimapinit);
- #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- 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
-@@ -534,7 +555,8 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
- unsigned IOCTL_TIOCSPGRP = TIOCSPGRP;
- unsigned IOCTL_TIOCSTI = TIOCSTI;
- unsigned IOCTL_TIOCSWINSZ = TIOCSWINSZ;
--#if ((SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID)
-+#if ((SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID)
- unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;
- unsigned IOCTL_SIOCGETVIFCNT = SIOCGETVIFCNT;
- #endif
-@@ -966,7 +988,7 @@ COMPILER_CHECK(IOC_NR(0x12345678) == _IO
- COMPILER_CHECK(IOC_TYPE(0x12345678) == _IOC_TYPE(0x12345678));
- #endif // SANITIZER_LINUX
-
--#if SANITIZER_LINUX || SANITIZER_FREEBSD
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_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));
-@@ -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);
--#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- CHECK_TYPE_SIZE(glob_t);
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
- CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
-@@ -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);
--#elif SANITIZER_FREEBSD
-+#elif SANITIZER_FREEBSD || SANITIZER_NETBSD
- // There is no 'd_off' field on FreeBSD.
- #else
- CHECK_SIZE_AND_OFFSET(dirent, d_off);
-@@ -1125,11 +1148,15 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno
-
- CHECK_TYPE_SIZE(ether_addr);
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- CHECK_TYPE_SIZE(ipc_perm);
- # if SANITIZER_FREEBSD
- CHECK_SIZE_AND_OFFSET(ipc_perm, key);
- CHECK_SIZE_AND_OFFSET(ipc_perm, seq);
-+#elif SANITIZER_NETBSD
-+CHECK_SIZE_AND_OFFSET(ipc_perm, _key);
-+CHECK_SIZE_AND_OFFSET(ipc_perm, _seq);
- # else
- CHECK_SIZE_AND_OFFSET(ipc_perm, __key);
- CHECK_SIZE_AND_OFFSET(ipc_perm, __seq);
-@@ -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);
--#if SANITIZER_LINUX || SANITIZER_FREEBSD
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
- // Compare against the union, because we can't reach into the union in a
- // compliant way.
- #ifdef ifa_dstaddr
- #undef ifa_dstaddr
- #endif
--# if SANITIZER_FREEBSD
-+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
- CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
- # else
- COMPILER_CHECK(sizeof(((__sanitizer_ifaddrs *)nullptr)->ifa_dstaddr) ==
- sizeof(((ifaddrs *)nullptr)->ifa_ifu));
- COMPILER_CHECK(offsetof(__sanitizer_ifaddrs, ifa_dstaddr) ==
- offsetof(ifaddrs, ifa_ifu));
--# endif // SANITIZER_FREEBSD
-+#endif // SANITIZER_FREEBSD || SANITIZER_NETBSD
- #else
- CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
- #endif // SANITIZER_LINUX
-@@ -1280,4 +1307,5 @@ CHECK_TYPE_SIZE(sem_t);
- COMPILER_CHECK(ARM_VFPREGS_SIZE == ARM_VFPREGS_SIZE_ASAN);
- #endif
-
--#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
-+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC ||
-+ // SANITIZER_NETBSD
diff --git a/compiler-rt-git/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h b/compiler-rt-git/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
deleted file mode 100644
index 71730992a9..0000000000
--- a/compiler-rt-git/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
+++ /dev/null
@@ -1,587 +0,0 @@
-$NetBSD$
-
---- lib/sanitizer_common/sanitizer_platform_limits_posix.h.orig 2017-07-16 22:40:10.000000000 +0000
-+++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
-@@ -18,18 +18,31 @@
- #include "sanitizer_internal_defs.h"
- #include "sanitizer_platform.h"
-
-+// FreeBSD's and NetBSD's dlopen() returns a pointer to an Obj_Entry structure
-+// that incorporates the map structure.
- #if SANITIZER_FREEBSD
--// FreeBSD's dlopen() returns a pointer to an Obj_Entry structure that
--// incorporates the map structure.
- # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
- ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 544)))
--// Get sys/_types.h, because that tells us whether 64-bit inodes are
--// used in struct dirent below.
--#include <sys/_types.h>
-+#elif SANITIZER_NETBSD
-+#if defined(__x86_64__)
-+#define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
-+ ((link_map *)((handle) == nullptr ? nullptr : ((char *)(handle) + 608)))
-+#elif defined(__i386__)
-+#define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
-+ ((link_map *)((handle) == nullptr ? nullptr : ((char *)(handle) + 324)))
-+#else
-+#error Port sanitizer_platform_limits_posix.h.
-+#endif
- #else
- # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) ((link_map*)(handle))
- #endif // !SANITIZER_FREEBSD
-
-+#if SANITIZER_FREEBSD
-+// Get sys/_types.h, because that tells us whether 64-bit inodes are
-+// used in struct dirent below.
-+#include <sys/_types.h>
-+#endif
-+
- #ifndef __GLIBC_PREREQ
- #define __GLIBC_PREREQ(x, y) 0
- #endif
-@@ -37,7 +50,7 @@
- namespace __sanitizer {
- extern unsigned struct_utsname_sz;
- extern unsigned struct_stat_sz;
--#if !SANITIZER_FREEBSD && !SANITIZER_IOS
-+#if !SANITIZER_FREEBSD && !SANITIZER_IOS && !SANITIZER_NETBSD
- extern unsigned struct_stat64_sz;
- #endif
- extern unsigned struct_rusage_sz;
-@@ -55,10 +68,14 @@ namespace __sanitizer {
- extern unsigned struct_itimerspec_sz;
- extern unsigned struct_sigevent_sz;
- extern unsigned struct_sched_param_sz;
-+#if !SANITIZER_NETBSD
- extern unsigned struct_statfs64_sz;
-+#endif
-
- #if !SANITIZER_ANDROID
-+#if !SANITIZER_NETBSD
- extern unsigned struct_statfs_sz;
-+#endif
- extern unsigned struct_sockaddr_sz;
- extern unsigned ucontext_t_sz;
- #endif // !SANITIZER_ANDROID
-@@ -127,12 +144,16 @@ namespace __sanitizer {
- #elif !defined(__sparc__)
- const unsigned struct___old_kernel_stat_sz = 32;
- #endif
-+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-+
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
-
- extern unsigned struct_rlimit_sz;
- extern unsigned struct_utimbuf_sz;
- extern unsigned struct_timespec_sz;
-
- struct __sanitizer_iocb {
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD
- u64 aio_data;
- u32 aio_key_or_aio_reserved1; // Simply crazy.
- u32 aio_reserved1_or_aio_key; // Luckily, we don't need these.
-@@ -144,19 +165,40 @@ namespace __sanitizer {
- s64 aio_offset;
- u64 aio_reserved2;
- u64 aio_reserved3;
-+#elif SANITIZER_NETBSD
-+ u64 aio_offset;
-+ uptr aio_buf;
-+ long aio_nbytes;
-+ u32 aio_fildes;
-+ u32 aio_lio_opcode;
-+ long aio_reqprio;
-+#if _LP64
-+ u8 aio_sigevent[32];
-+#else
-+ u8 aio_sigevent[20];
-+#endif
-+ u32 _state;
-+ u32 _errno;
-+ long _retval;
-+#endif
- };
-+#endif
-
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD
- struct __sanitizer_io_event {
- u64 data;
- u64 obj;
- u64 res;
- u64 res2;
- };
-+#endif
-
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD
- const unsigned iocb_cmd_pread = 0;
- const unsigned iocb_cmd_pwrite = 1;
- const unsigned iocb_cmd_preadv = 7;
- const unsigned iocb_cmd_pwritev = 8;
-+#endif
-
- struct __sanitizer___sysctl_args {
- int *name;
-@@ -165,11 +207,16 @@ namespace __sanitizer {
- uptr *oldlenp;
- void *newval;
- uptr newlen;
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD
- unsigned long ___unused[4];
-+#endif
- };
-
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD
- const unsigned old_sigset_t_sz = sizeof(unsigned long);
-+#endif
-
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
- struct __sanitizer_sem_t {
- #if SANITIZER_ANDROID && defined(_LP64)
- int data[4];
-@@ -179,9 +226,11 @@ namespace __sanitizer {
- uptr data[4];
- #elif SANITIZER_FREEBSD
- u32 data[4];
-+#elif SANITIZER_NETBSD
-+ uptr data[5];
- #endif
- };
--#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
-
- #if SANITIZER_ANDROID
- struct __sanitizer_mallinfo {
-@@ -324,14 +373,39 @@ namespace __sanitizer {
- unsigned long shm_dtime;
- unsigned long shm_ctime;
- };
-+
-+#elif SANITIZER_NETBSD
-+ struct __sanitizer_ipc_perm {
-+ u32 uid;
-+ u32 gid;
-+ u32 cuid;
-+ u32 cgid;
-+ u32 mode;
-+ unsigned short _seq;
-+ long _key;
-+ };
-+
-+ struct __sanitizer_shmid_ds {
-+ __sanitizer_ipc_perm shm_perm;
-+ unsigned long shm_segsz;
-+ u32 shm_lpid;
-+ u32 shm_cpid;
-+ unsigned int shm_nattch;
-+ u64 shm_atime;
-+ u64 shm_dtime;
-+ u64 shm_ctime;
-+ void *_shm_internal;
-+ };
- #endif
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- extern unsigned struct_msqid_ds_sz;
- extern unsigned struct_mq_attr_sz;
- extern unsigned struct_timex_sz;
- extern unsigned struct_statvfs_sz;
--#endif // (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#endif // (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) &&
-+ // !SANITIZER_ANDROID
-
- struct __sanitizer_iovec {
- void *iov_base;
-@@ -351,6 +425,9 @@ namespace __sanitizer {
- # endif
- void *ifa_dstaddr; // (struct sockaddr *)
- void *ifa_data;
-+#if SANITIZER_NETBSD
-+ unsigned int ifa_addrflags;
-+#endif
- };
- #endif // !SANITIZER_ANDROID
-
-@@ -376,13 +453,19 @@ namespace __sanitizer {
- const int __sanitizer_XDR_FREE = 2;
- #endif
-
-+#if SANITIZER_NETBSD || (defined(__x86_64__) && !defined(_LP64))
-+ typedef long long __sanitizer_time_t;
-+#else
-+ typedef long __sanitizer_time_t;
-+#endif
-+
- struct __sanitizer_passwd {
- char *pw_name;
- char *pw_passwd;
- int pw_uid;
- int pw_gid;
--#if SANITIZER_MAC || SANITIZER_FREEBSD
-- long pw_change;
-+#if SANITIZER_MAC || SANITIZER_FREEBSD || SANITIZER_NETBSD
-+ __sanitizer_time_t pw_change;
- char *pw_class;
- #endif
- #if !(SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 32))
-@@ -390,8 +473,8 @@ namespace __sanitizer {
- #endif
- char *pw_dir;
- char *pw_shell;
--#if SANITIZER_MAC || SANITIZER_FREEBSD
-- long pw_expire;
-+#if SANITIZER_MAC || SANITIZER_FREEBSD || SANITIZER_NETBSD
-+ __sanitizer_time_t pw_expire;
- #endif
- #if SANITIZER_FREEBSD
- int pw_fields;
-@@ -405,12 +488,6 @@ namespace __sanitizer {
- char **gr_mem;
- };
-
--#if defined(__x86_64__) && !defined(_LP64)
-- typedef long long __sanitizer_time_t;
--#else
-- typedef long __sanitizer_time_t;
--#endif
--
- struct __sanitizer_timeb {
- __sanitizer_time_t time;
- unsigned short millitm;
-@@ -447,7 +524,7 @@ namespace __sanitizer {
- };
- #endif
-
--#if SANITIZER_MAC || SANITIZER_FREEBSD
-+#if SANITIZER_MAC || SANITIZER_FREEBSD || SANITIZER_NETBSD
- struct __sanitizer_msghdr {
- void *msg_name;
- unsigned msg_namelen;
-@@ -497,6 +574,12 @@ namespace __sanitizer {
- unsigned short d_reclen;
- // more fields that we don't care about
- };
-+#elif SANITIZER_NETBSD
-+ struct __sanitizer_dirent {
-+ u64 d_fileno;
-+ u16 d_reclen;
-+ // more fields that we don't care about
-+ };
- #elif SANITIZER_ANDROID || defined(__x86_64__)
- struct __sanitizer_dirent {
- unsigned long long d_ino;
-@@ -523,7 +606,7 @@ namespace __sanitizer {
- #endif
-
- // 'clock_t' is 32 bits wide on x64 FreeBSD
--#if SANITIZER_FREEBSD
-+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
- typedef int __sanitizer_clock_t;
- #elif defined(__x86_64__) && !defined(_LP64)
- typedef long long __sanitizer_clock_t;
-@@ -531,7 +614,7 @@ namespace __sanitizer {
- typedef long __sanitizer_clock_t;
- #endif
-
--#if SANITIZER_LINUX
-+#if SANITIZER_LINUX || SANITIZER_NETBSD
- typedef int __sanitizer_clockid_t;
- #endif
-
-@@ -562,8 +645,22 @@ namespace __sanitizer {
- typedef struct {
- unsigned long fds_bits[1024 / (8 * sizeof(long))];
- } __sanitizer___kernel_fd_set;
-+#elif SANITIZER_NETBSD
-+ typedef u32 __sanitizer___kernel_uid_t;
-+ typedef u32 __sanitizer___kernel_gid_t;
-+ typedef u64 __sanitizer___kernel_off_t;
-+ typedef struct {
-+ u32 fds_bits[8];
-+ } __sanitizer___kernel_fd_set;
- #endif
-
-+#if SANITIZER_NETBSD
-+ typedef struct {
-+ unsigned int pta_magic;
-+ int pta_flags;
-+ void *pta_private;
-+ } __sanitizer_pthread_attr_t;
-+#else
- // This thing depends on the platform. We are only interested in the upper
- // limit. Verified with a compiler assert in .cc.
- const int pthread_attr_t_max_sz = 128;
-@@ -571,6 +668,7 @@ namespace __sanitizer {
- char size[pthread_attr_t_max_sz]; // NOLINT
- void *align;
- };
-+#endif
-
- #if SANITIZER_ANDROID
- # if SANITIZER_MIPS
-@@ -585,7 +683,7 @@ namespace __sanitizer {
- // The size is determined by looking at sizeof of real sigset_t on linux.
- uptr val[128 / sizeof(uptr)];
- };
--#elif SANITIZER_FREEBSD
-+#elif SANITIZER_FREEBSD || SANITIZER_NETBSD
- struct __sanitizer_sigset_t {
- // uint32_t * 4
- unsigned int __bits[4];
-@@ -622,6 +720,15 @@ namespace __sanitizer {
- uptr sa_flags;
- void (*sa_restorer)();
- };
-+#elif SANITIZER_NETBSD
-+ struct __sanitizer_sigaction {
-+ union {
-+ void (*handler)(int sig);
-+ void (*sigaction)(int sig, void *siginfo, void *uctx);
-+ };
-+ __sanitizer_sigset_t sa_mask;
-+ int sa_flags;
-+ };
- #else // !SANITIZER_ANDROID
- struct __sanitizer_sigaction {
- #if defined(__mips__) && !SANITIZER_FREEBSD
-@@ -670,7 +777,7 @@ namespace __sanitizer {
- };
- #endif // !SANITIZER_ANDROID
-
--#if SANITIZER_FREEBSD
-+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
- typedef __sanitizer_sigset_t __sanitizer_kernel_sigset_t;
- #elif defined(__mips__)
- struct __sanitizer_kernel_sigset_t {
-@@ -717,7 +824,7 @@ namespace __sanitizer {
- extern int af_inet6;
- uptr __sanitizer_in_addr_sz(int af);
-
--#if SANITIZER_LINUX || SANITIZER_FREEBSD
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
- struct __sanitizer_dl_phdr_info {
- uptr dlpi_addr;
- const char *dlpi_name;
-@@ -733,7 +840,7 @@ namespace __sanitizer {
- int ai_family;
- int ai_socktype;
- int ai_protocol;
--#if SANITIZER_ANDROID || SANITIZER_MAC || SANITIZER_FREEBSD
-+#if SANITIZER_ANDROID || SANITIZER_MAC || SANITIZER_FREEBSD || SANITIZER_NETBSD
- unsigned ai_addrlen;
- char *ai_canonname;
- void *ai_addr;
-@@ -759,7 +866,7 @@ namespace __sanitizer {
- short revents;
- };
-
--#if SANITIZER_ANDROID || SANITIZER_MAC || SANITIZER_FREEBSD
-+#if SANITIZER_ANDROID || SANITIZER_MAC || SANITIZER_FREEBSD || SANITIZER_NETBSD
- typedef unsigned __sanitizer_nfds_t;
- #else
- typedef unsigned long __sanitizer_nfds_t;
-@@ -779,7 +886,7 @@ namespace __sanitizer {
- int (*gl_lstat)(const char *, void *);
- int (*gl_stat)(const char *, void *);
- };
--# elif SANITIZER_FREEBSD
-+#elif SANITIZER_FREEBSD || SANITIZER_NETBSD
- struct __sanitizer_glob_t {
- uptr gl_pathc;
- uptr gl_matchc;
-@@ -793,9 +900,9 @@ namespace __sanitizer {
- int (*gl_lstat)(const char*, void* /* struct stat* */);
- int (*gl_stat)(const char*, void* /* struct stat* */);
- };
--# endif // SANITIZER_FREEBSD
-+#endif // SANITIZER_FREEBSD || SANITIZER_NETBSD
-
--# if SANITIZER_LINUX || SANITIZER_FREEBSD
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
- extern int glob_nomatch;
- extern int glob_altdirfunc;
- # endif
-@@ -807,7 +914,7 @@ namespace __sanitizer {
- uptr we_wordc;
- char **we_wordv;
- uptr we_offs;
--#if SANITIZER_FREEBSD
-+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
- char *we_strings;
- uptr we_nbytes;
- #endif
-@@ -864,7 +971,8 @@ namespace __sanitizer {
- extern int ptrace_geteventmsg;
- #endif
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- extern unsigned struct_shminfo_sz;
- extern unsigned struct_shm_info_sz;
- extern int shmctl_ipc_stat;
-@@ -967,38 +1075,41 @@ struct __sanitizer_cookie_io_functions_t
- #define IOC_SIZE(nr) (((nr) >> IOC_SIZESHIFT) & IOC_SIZEMASK)
- #endif
-
-- extern unsigned struct_ifreq_sz;
-- extern unsigned struct_termios_sz;
-- extern unsigned struct_winsize_sz;
-+extern unsigned struct_ifreq_sz;
-+extern unsigned struct_termios_sz;
-+extern unsigned struct_winsize_sz;
-+
-+#if SANITIZER_LINUX || SANITIZER_NETBSD
-+extern unsigned struct_arpreq_sz;
-+#endif
-
- #if SANITIZER_LINUX
-- extern unsigned struct_arpreq_sz;
-- extern unsigned struct_cdrom_msf_sz;
-- extern unsigned struct_cdrom_multisession_sz;
-- extern unsigned struct_cdrom_read_audio_sz;
-- extern unsigned struct_cdrom_subchnl_sz;
-- extern unsigned struct_cdrom_ti_sz;
-- extern unsigned struct_cdrom_tocentry_sz;
-- extern unsigned struct_cdrom_tochdr_sz;
-- extern unsigned struct_cdrom_volctrl_sz;
-- extern unsigned struct_ff_effect_sz;
-- extern unsigned struct_floppy_drive_params_sz;
-- extern unsigned struct_floppy_drive_struct_sz;
-- extern unsigned struct_floppy_fdc_state_sz;
-- extern unsigned struct_floppy_max_errors_sz;
-- extern unsigned struct_floppy_raw_cmd_sz;
-- extern unsigned struct_floppy_struct_sz;
-- extern unsigned struct_floppy_write_errors_sz;
-- extern unsigned struct_format_descr_sz;
-- extern unsigned struct_hd_driveid_sz;
-- extern unsigned struct_hd_geometry_sz;
-- extern unsigned struct_input_absinfo_sz;
-- extern unsigned struct_input_id_sz;
-- extern unsigned struct_mtpos_sz;
-- extern unsigned struct_termio_sz;
-- extern unsigned struct_vt_consize_sz;
-- extern unsigned struct_vt_sizes_sz;
-- extern unsigned struct_vt_stat_sz;
-+extern unsigned struct_cdrom_msf_sz;
-+extern unsigned struct_cdrom_multisession_sz;
-+extern unsigned struct_cdrom_read_audio_sz;
-+extern unsigned struct_cdrom_subchnl_sz;
-+extern unsigned struct_cdrom_ti_sz;
-+extern unsigned struct_cdrom_tocentry_sz;
-+extern unsigned struct_cdrom_tochdr_sz;
-+extern unsigned struct_cdrom_volctrl_sz;
-+extern unsigned struct_ff_effect_sz;
-+extern unsigned struct_floppy_drive_params_sz;
-+extern unsigned struct_floppy_drive_struct_sz;
-+extern unsigned struct_floppy_fdc_state_sz;
-+extern unsigned struct_floppy_max_errors_sz;
-+extern unsigned struct_floppy_raw_cmd_sz;
-+extern unsigned struct_floppy_struct_sz;
-+extern unsigned struct_floppy_write_errors_sz;
-+extern unsigned struct_format_descr_sz;
-+extern unsigned struct_hd_driveid_sz;
-+extern unsigned struct_hd_geometry_sz;
-+extern unsigned struct_input_absinfo_sz;
-+extern unsigned struct_input_id_sz;
-+extern unsigned struct_mtpos_sz;
-+extern unsigned struct_termio_sz;
-+extern unsigned struct_vt_consize_sz;
-+extern unsigned struct_vt_sizes_sz;
-+extern unsigned struct_vt_stat_sz;
- #endif // SANITIZER_LINUX
-
- #if SANITIZER_LINUX || SANITIZER_FREEBSD
-@@ -1006,6 +1117,9 @@ struct __sanitizer_cookie_io_functions_t
- extern unsigned struct_copr_debug_buf_sz;
- extern unsigned struct_copr_msg_sz;
- extern unsigned struct_midi_info_sz;
-+#endif
-+
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
- extern unsigned struct_mtget_sz;
- extern unsigned struct_mtop_sz;
- extern unsigned struct_rtentry_sz;
-@@ -1013,7 +1127,7 @@ struct __sanitizer_cookie_io_functions_t
- extern unsigned struct_seq_event_rec_sz;
- extern unsigned struct_synth_info_sz;
- extern unsigned struct_vt_mode_sz;
--#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- extern unsigned struct_ax25_parms_struct_sz;
-@@ -1035,10 +1149,12 @@ struct __sanitizer_cookie_io_functions_t
- extern unsigned struct_unimapinit_sz;
- #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- extern unsigned struct_audio_buf_info_sz;
- extern unsigned struct_ppp_stats_sz;
--#endif // (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#endif // (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) &&
-+ // !SANITIZER_ANDROID
-
- #if !SANITIZER_ANDROID && !SANITIZER_MAC
- extern unsigned struct_sioc_sg_req_sz;
-@@ -1095,7 +1211,8 @@ struct __sanitizer_cookie_io_functions_t
- extern unsigned IOCTL_TIOCSPGRP;
- extern unsigned IOCTL_TIOCSTI;
- extern unsigned IOCTL_TIOCSWINSZ;
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
- extern unsigned IOCTL_SIOCGETSGCNT;
- extern unsigned IOCTL_SIOCGETVIFCNT;
- #endif
-@@ -1258,7 +1375,7 @@ struct __sanitizer_cookie_io_functions_t
- extern unsigned IOCTL_VT_RESIZEX;
- extern unsigned IOCTL_VT_SENDSIG;
- #endif // SANITIZER_LINUX
--#if SANITIZER_LINUX || SANITIZER_FREEBSD
-+#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
- extern unsigned IOCTL_MTIOCGET;
- extern unsigned IOCTL_MTIOCTOP;
- extern unsigned IOCTL_SIOCADDRT;
-@@ -1359,7 +1476,7 @@ struct __sanitizer_cookie_io_functions_t
- extern unsigned IOCTL_VT_RELDISP;
- extern unsigned IOCTL_VT_SETMODE;
- extern unsigned IOCTL_VT_WAITACTIVE;
--#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-+#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
-
- #if SANITIZER_LINUX && !SANITIZER_ANDROID
- extern unsigned IOCTL_CYGETDEFTHRESH;
-@@ -1448,21 +1565,28 @@ struct __sanitizer_cookie_io_functions_t
- extern unsigned IOCTL_TIOCSSERIAL;
- #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
-
--#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-+#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && \
-+ !SANITIZER_ANDROID
-+#if !SANITIZER_NETBSD
- extern unsigned IOCTL_GIO_SCRNMAP;
-+#endif
- extern unsigned IOCTL_KDDISABIO;
- extern unsigned IOCTL_KDENABIO;
- extern unsigned IOCTL_KDGETLED;
-+#if !SANITIZER_NETBSD
- extern unsigned IOCTL_KDGETMODE;
-+#endif
- extern unsigned IOCTL_KDGKBMODE;
- extern unsigned IOCTL_KDGKBTYPE;
- extern unsigned IOCTL_KDMKTONE;
- extern unsigned IOCTL_KDSETLED;
- extern unsigned IOCTL_KDSETMODE;
- extern unsigned IOCTL_KDSKBMODE;
-+#if !SANITIZER_NETBSD
- extern unsigned IOCTL_KIOCSOUND;
- extern unsigned IOCTL_PIO_SCRNMAP;
- #endif
-+#endif
-
- extern const int si_SEGV_MAPERR;
- extern const int si_SEGV_ACCERR;
Home |
Main Index |
Thread Index |
Old Index