pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

compiler-rt-netbsd: Push forwards msan porting



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Jun 13 18:44:55 2017 +0200
Changeset:	46646d4ccda2d87aa72c37b769878a0a6149f828

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 forwards msan porting

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=46646d4ccda2d87aa72c37b769878a0a6149f828

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 | 118 +++++++++++++++++++++
 2 files changed, 119 insertions(+), 1 deletion(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index b6a026c984..438c88b839 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) = cc1b9d4cc0f9db359c442c311512dc50842f18b6
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 784a469ee1cecbcb49d93d00cb63306f9108ea81
 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 d15db04500..d2689f2bce 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
@@ -318,3 +318,121 @@ $NetBSD$
  # if SANITIZER_MIPS
    typedef unsigned long __sanitizer_sigset_t[16/sizeof(unsigned long)];
  # else
+@@ -590,6 +700,10 @@ namespace __sanitizer {
+      // uint32_t * 4
+      unsigned int __bits[4];
+   };
++#elif SANITIZER_NETBSD
++  struct __sanitizer_sigset_t {
++     u32 __bits[4];
++  };
+ #endif
+ 
+   // Linux system headers define the 'sa_handler' and 'sa_sigaction' macros.
+@@ -631,7 +745,7 @@ namespace __sanitizer {
+       void (*sigaction)(int sig, void *siginfo, void *uctx);
+       void (*handler)(int sig);
+     };
+-#if SANITIZER_FREEBSD
++#if SANITIZER_FREEBSD || SANITIZER_NETBSD
+     int sa_flags;
+     __sanitizer_sigset_t sa_mask;
+ #else
+@@ -670,7 +784,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 +831,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 +847,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 +873,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 +893,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 +907,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 +921,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
+@@ -832,6 +946,31 @@ namespace __sanitizer {
+     int _fileno;
+   };
+ # define SANITIZER_HAS_STRUCT_FILE 1
++#elif SANITIZER_NETBSD
++  struct __sanitizer_FILE {
++    unsigned char *_p;
++    int     _r;
++    int     _w;
++    unsigned short _flags;
++    short   _file;
++    struct  __sbuf _bf;
++    int     _lbfsize;
++    void    *_cookie;
++    int     (*_close)(void *);
++    ssize_t (*_read) (void *, void *, size_t);
++    u64 (*_seek) (void *, __off_t, int);
++    ssize_t (*_write)(void *, const void *, size_t);
++    struct  __sbuf _ext;
++    unsigned char *_up;
++    int     _ur;
++    unsigned char _ubuf[3];
++    unsigned char _nbuf[1];
++    int     (*_flush)(void *);
++    char    _lb_unused[sizeof(struct __sbuf) - sizeof(int (*)(void *))];
++    int     _blksize;
++    __off_t _offset;
++  };
++# define SANITIZER_HAS_STRUCT_FILE 1
+ #else
+   typedef void __sanitizer_FILE;
+ # define SANITIZER_HAS_STRUCT_FILE 0


Home | Main Index | Thread Index | Old Index