pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Fix ipc_perm, shmid_ds, ether_addr on NetBSD
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed Jun 28 02:02:18 2017 +0200
Changeset: 58f92e70586f5575347e28e1a5be093a047e80e4
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
Log Message:
compiler-rt-netbsd: Fix ipc_perm, shmid_ds, ether_addr on NetBSD
Match these structs 1:1 for the NetBSD system.
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=58f92e70586f5575347e28e1a5be093a047e80e4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 4 +--
...r__common_sanitizer__platform__limits__posix.cc | 31 +++++++++++-----------
...er__common_sanitizer__platform__limits__posix.h | 30 ++++++++++++---------
3 files changed, 35 insertions(+), 30 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index c62f926b70..8298ef4093 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -33,8 +33,8 @@ SHA1 (patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc) = 3f2be0e646495c
SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd.h) = c1c19a402137e21ddc5bb48f8825400a34f010cc
SHA1 (patch-lib_sanitizer__common_sanitizer__platform.h) = 47360a8352cc34fddc71c8f71081d7d589a63dad
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = cb3ae73d6ea041180116112c2a6b081a13155e60
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = d4c0c967b53dbdf86090c7f0fba9b808302cca77
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 7dba6f2f87e2543d534fc0dc7493baf19ae9f975
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = e051889928bb0c15ada906b2747dbe6664cdd8fc
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 685e50c2599edd9abb5393568724bbc97f036085
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps.h) = ec0b5c576463639a3ee66c33ff7e9d94076f40df
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__common.cc) = 0c30494654cfc0294804434d40468f6f722a6786
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc) = a7e97fdb92e166f9d1def5a169c1fd079d8bb40a
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
index 1f72a65e9b..c1616818a1 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
@@ -43,12 +43,13 @@ $NetBSD$
#define _KERNEL // to declare 'shminfo' structure
# include <sys/shm.h>
#undef _KERNEL
-@@ -111,11 +113,18 @@
+@@ -111,11 +113,19 @@
#undef INLINE // to avoid clashes with sanitizers' definitions
#endif
-#if SANITIZER_FREEBSD || SANITIZER_IOS
+#if SANITIZER_NETBSD
++# include <net/if_ether.h>
+# include <sys/shm.h>
+# include <link_elf.h>
+# define statfs statvfs
@@ -64,7 +65,7 @@ $NetBSD$
# include <utime.h>
# include <sys/ptrace.h>
# if defined(__mips64) || defined(__aarch64__) || defined(__arm__)
-@@ -200,9 +209,9 @@ typedef struct user_fpregs elf_fpregset_
+@@ -200,9 +210,9 @@ typedef struct user_fpregs elf_fpregset_
namespace __sanitizer {
unsigned struct_utsname_sz = sizeof(struct utsname);
unsigned struct_stat_sz = sizeof(struct stat);
@@ -76,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 +254,12 @@ namespace __sanitizer {
+@@ -245,12 +255,12 @@ namespace __sanitizer {
unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname);
#endif // SANITIZER_LINUX
@@ -91,7 +92,7 @@ $NetBSD$
#if SANITIZER_LINUX && !SANITIZER_ANDROID
unsigned struct_ustat_sz = sizeof(struct ustat);
-@@ -258,12 +267,12 @@ namespace __sanitizer {
+@@ -258,12 +268,12 @@ namespace __sanitizer {
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
@@ -106,7 +107,7 @@ $NetBSD$
uptr sig_ign = (uptr)SIG_IGN;
uptr sig_dfl = (uptr)SIG_DFL;
-@@ -310,7 +319,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -310,7 +320,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
#endif
@@ -115,7 +116,7 @@ $NetBSD$
int glob_nomatch = GLOB_NOMATCH;
int glob_altdirfunc = GLOB_ALTDIRFUNC;
#endif
-@@ -452,7 +461,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -452,7 +462,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);
@@ -124,7 +125,7 @@ $NetBSD$
#if SANITIZER_LINUX && !SANITIZER_ANDROID
unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
-@@ -479,7 +488,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -479,7 +489,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
unsigned struct_unimapinit_sz = sizeof(struct unimapinit);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
@@ -133,7 +134,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 +544,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -535,7 +545,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
unsigned IOCTL_TIOCSPGRP = TIOCSPGRP;
unsigned IOCTL_TIOCSTI = TIOCSTI;
unsigned IOCTL_TIOCSWINSZ = TIOCSWINSZ;
@@ -142,7 +143,7 @@ $NetBSD$
unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;
unsigned IOCTL_SIOCGETVIFCNT = SIOCGETVIFCNT;
#endif
-@@ -975,7 +984,7 @@ COMPILER_CHECK(IOC_NR(0x12345678) == _IO
+@@ -975,7 +985,7 @@ COMPILER_CHECK(IOC_NR(0x12345678) == _IO
COMPILER_CHECK(IOC_TYPE(0x12345678) == _IOC_TYPE(0x12345678));
#endif // SANITIZER_LINUX
@@ -151,7 +152,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 +992,9 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi
+@@ -983,9 +993,9 @@ 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);
@@ -163,7 +164,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 +1046,7 @@ COMPILER_CHECK(sizeof(__sanitizer_dirent
+@@ -1037,7 +1047,7 @@ COMPILER_CHECK(sizeof(__sanitizer_dirent
CHECK_SIZE_AND_OFFSET(dirent, d_ino);
#if SANITIZER_MAC
CHECK_SIZE_AND_OFFSET(dirent, d_seekoff);
@@ -172,7 +173,7 @@ $NetBSD$
// There is no 'd_off' field on FreeBSD.
#else
CHECK_SIZE_AND_OFFSET(dirent, d_off);
-@@ -1134,11 +1143,14 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno
+@@ -1134,11 +1144,14 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno
CHECK_TYPE_SIZE(ether_addr);
@@ -188,7 +189,7 @@ $NetBSD$
# else
CHECK_SIZE_AND_OFFSET(ipc_perm, __key);
CHECK_SIZE_AND_OFFSET(ipc_perm, __seq);
-@@ -1175,20 +1187,20 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_next)
+@@ -1175,20 +1188,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);
@@ -212,7 +213,7 @@ $NetBSD$
#else
CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
#endif // SANITIZER_LINUX
-@@ -1281,7 +1293,7 @@ CHECK_SIZE_AND_OFFSET(cookie_io_function
+@@ -1281,7 +1294,7 @@ CHECK_SIZE_AND_OFFSET(cookie_io_function
CHECK_SIZE_AND_OFFSET(cookie_io_functions_t, close);
#endif
@@ -221,7 +222,7 @@ $NetBSD$
CHECK_TYPE_SIZE(sem_t);
#endif
-@@ -1289,4 +1301,4 @@ CHECK_TYPE_SIZE(sem_t);
+@@ -1289,4 +1302,4 @@ CHECK_TYPE_SIZE(sem_t);
COMPILER_CHECK(ARM_VFPREGS_SIZE == ARM_VFPREGS_SIZE_ASAN);
#endif
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 a02ef48767..b2da25e2d5 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
@@ -174,7 +174,7 @@ $NetBSD$
struct __sanitizer_sem_t {
#if SANITIZER_ANDROID && defined(_LP64)
int data[4];
-@@ -179,6 +254,14 @@ namespace __sanitizer {
+@@ -179,9 +254,17 @@ namespace __sanitizer {
uptr data[4];
#elif SANITIZER_FREEBSD
u32 data[4];
@@ -188,7 +188,11 @@ $NetBSD$
+#endif
#endif
};
- #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+-#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
++#endif // SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
+
+ #if SANITIZER_ANDROID
+ struct __sanitizer_mallinfo {
@@ -324,14 +407,37 @@ namespace __sanitizer {
unsigned long shm_dtime;
unsigned long shm_ctime;
@@ -196,11 +200,11 @@ $NetBSD$
+
+#elif SANITIZER_NETBSD
+ struct __sanitizer_ipc_perm {
-+ unsigned int uid;
-+ unsigned int gid;
-+ unsigned int cuid;
-+ unsigned int cgid;
-+ unsigned short mode;
++ u32 uid;
++ u32 gid;
++ u32 cuid;
++ u32 cgid;
++ u32 mode;
+ unsigned short _seq;
+ long _key;
+ };
@@ -208,12 +212,12 @@ $NetBSD$
+ struct __sanitizer_shmid_ds {
+ __sanitizer_ipc_perm shm_perm;
+ unsigned long shm_segsz;
-+ unsigned int shm_lpid;
-+ unsigned int shm_cpid;
-+ int shm_nattch;
-+ unsigned long shm_atime;
-+ unsigned long shm_dtime;
-+ unsigned long shm_ctime;
++ u32 shm_lpid;
++ u32 shm_cpid;
++ unsigned int shm_nattch;
++ u64 shm_atime;
++ u64 shm_dtime;
++ u64 shm_ctime;
+ void *_shm_internal;
+ };
#endif
Home |
Main Index |
Thread Index |
Old Index