pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Push msan structs porting forwards
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Tue Jun 13 16:59:36 2017 +0200
Changeset: 11fb56c27cfa9c69469c3d31514d82ee493d4180
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
Log Message:
compiler-rt-netbsd: Push msan structs porting forwards
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=11fb56c27cfa9c69469c3d31514d82ee493d4180
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 2 +-
...er__common_sanitizer__platform__limits__posix.h | 110 ++++++++++++++++++---
2 files changed, 97 insertions(+), 15 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index aebdf4cea8..b6a026c984 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -17,7 +17,7 @@ SHA1 (patch-lib_asan_scripts_asan__symbolize.py) = d6c079e7092b22b5379293dbb8d1e
SHA1 (patch-lib_builtins_gcc__personality__v0.c) = 0a48656e68614730ea05e8fb2588434e774b3c45
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = 45b18179c5d1d9f284ccfe4670a989ac30d05e92
SHA1 (patch-lib_sanitizer__common_sanitizer__platform.h) = 47360a8352cc34fddc71c8f71081d7d589a63dad
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 5c7f96537a7c387ceb8545f4a9ded0f826af188f
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = cc1b9d4cc0f9db359c442c311512dc50842f18b6
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc) = 0b8d88529f7374a1159c65c0bccd946ccf6a65f3
SHA1 (patch-test_asan_lit.cfg) = 259b0e262b5975b862a51f015ec6b646ce2af10a
SHA1 (patch-test_sanitizer__common_CMakeLists.txt) = 6af4c5ca42f17bb09823c36bf32d5576fbc0b4c8
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
index 186b800fe5..d15db04500 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
@@ -48,7 +48,7 @@ $NetBSD$
extern unsigned struct_stat64_sz;
#endif
extern unsigned struct_rusage_sz;
-@@ -55,10 +68,16 @@ namespace __sanitizer {
+@@ -55,10 +68,14 @@ namespace __sanitizer {
extern unsigned struct_itimerspec_sz;
extern unsigned struct_sigevent_sz;
extern unsigned struct_sched_param_sz;
@@ -57,15 +57,13 @@ $NetBSD$
+#endif
#if !SANITIZER_ANDROID
-+#if SANITIZER_NETBSD
++#if !SANITIZER_NETBSD
extern unsigned struct_statfs_sz;
-+#else
-+ extern unsigned struct_statvfs_sz;
+#endif
extern unsigned struct_sockaddr_sz;
extern unsigned ucontext_t_sz;
#endif // !SANITIZER_ANDROID
-@@ -121,18 +140,21 @@ namespace __sanitizer {
+@@ -121,18 +138,21 @@ namespace __sanitizer {
#endif // SANITIZER_LINUX
#if SANITIZER_LINUX || SANITIZER_FREEBSD
@@ -88,7 +86,7 @@ $NetBSD$
u64 aio_data;
u32 aio_key_or_aio_reserved1; // Simply crazy.
u32 aio_reserved1_or_aio_key; // Luckily, we don't need these.
-@@ -144,21 +166,53 @@ namespace __sanitizer {
+@@ -144,21 +164,53 @@ namespace __sanitizer {
s64 aio_offset;
u64 aio_reserved2;
u64 aio_reserved3;
@@ -142,7 +140,7 @@ $NetBSD$
int *name;
int nlen;
void *oldval;
-@@ -166,10 +220,32 @@ namespace __sanitizer {
+@@ -166,10 +218,32 @@ namespace __sanitizer {
void *newval;
uptr newlen;
unsigned long ___unused[4];
@@ -175,7 +173,7 @@ $NetBSD$
struct __sanitizer_sem_t {
#if SANITIZER_ANDROID && defined(_LP64)
int data[4];
-@@ -179,6 +255,14 @@ namespace __sanitizer {
+@@ -179,6 +253,14 @@ namespace __sanitizer {
uptr data[4];
#elif SANITIZER_FREEBSD
u32 data[4];
@@ -190,7 +188,7 @@ $NetBSD$
#endif
};
#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
-@@ -303,7 +387,7 @@ namespace __sanitizer {
+@@ -303,7 +385,7 @@ namespace __sanitizer {
#endif
#endif
};
@@ -199,7 +197,22 @@ $NetBSD$
struct __sanitizer_ipc_perm {
unsigned int cuid;
unsigned int cgid;
-@@ -351,6 +435,9 @@ namespace __sanitizer {
+@@ -326,12 +408,12 @@ namespace __sanitizer {
+ };
+ #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 +433,9 @@ namespace __sanitizer {
# endif
void *ifa_dstaddr; // (struct sockaddr *)
void *ifa_data;
@@ -209,7 +222,7 @@ $NetBSD$
};
#endif // !SANITIZER_ANDROID
-@@ -381,7 +468,7 @@ namespace __sanitizer {
+@@ -381,7 +466,7 @@ namespace __sanitizer {
char *pw_passwd;
int pw_uid;
int pw_gid;
@@ -218,7 +231,7 @@ $NetBSD$
long pw_change;
char *pw_class;
#endif
-@@ -390,7 +477,7 @@ namespace __sanitizer {
+@@ -390,7 +475,7 @@ namespace __sanitizer {
#endif
char *pw_dir;
char *pw_shell;
@@ -227,12 +240,81 @@ $NetBSD$
long pw_expire;
#endif
#if SANITIZER_FREEBSD
-@@ -447,7 +534,7 @@ namespace __sanitizer {
+@@ -405,7 +490,7 @@ namespace __sanitizer {
+ char **gr_mem;
+ };
+
+-#if defined(__x86_64__) && !defined(_LP64)
++#if SANITIZER_NETBSD || (defined(__x86_64__) && !defined(_LP64))
+ typedef long long __sanitizer_time_t;
+ #else
+ typedef long __sanitizer_time_t;
+@@ -447,7 +532,7 @@ namespace __sanitizer {
};
#endif
-#if SANITIZER_MAC || SANITIZER_FREEBSD
-+#if SANITIZER_MAC || SANITIZER_FREEBSD // XXX MARKER
++#if SANITIZER_MAC || SANITIZER_FREEBSD || SANITIZER_NETBSD
struct __sanitizer_msghdr {
void *msg_name;
unsigned msg_namelen;
+@@ -497,6 +582,16 @@ 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;
++#if 0 // not needed here?
++ u16 d_namlen;
++ u8 d_type;
++ u8 d_name[512];
++#endif
++ };
+ #elif SANITIZER_ANDROID || defined(__x86_64__)
+ struct __sanitizer_dirent {
+ unsigned long long d_ino;
+@@ -531,7 +626,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 +657,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,8 +680,9 @@ namespace __sanitizer {
+ char size[pthread_attr_t_max_sz]; // NOLINT
+ void *align;
+ };
++#endif
+
+-#if SANITIZER_ANDROID
++#if SANITIZER_ANDROID // XXX MARKER
+ # if SANITIZER_MIPS
+ typedef unsigned long __sanitizer_sigset_t[16/sizeof(unsigned long)];
+ # else
Home |
Main Index |
Thread Index |
Old Index