pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Sync patches with my local copy



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Dec 8 19:32:48 2017 +0100
Changeset:	957886bda3520702331131cc6b40fd1c85e36459

Modified Files:
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-lib_msan_msan.h
Added Files:
	compiler-rt-netbsd/patches/patch-lib_msan_msan__allocator.cc
	compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
	compiler-rt-netbsd/patches/patch-test_msan_ftime.cc
	compiler-rt-netbsd/patches/patch-test_msan_iconv.cc
	compiler-rt-netbsd/patches/patch-test_msan_ifaddrs.cc
	compiler-rt-netbsd/patches/patch-test_msan_pvalloc.cc
	compiler-rt-netbsd/patches/patch-test_msan_textdomain.cc
	compiler-rt-netbsd/patches/patch-test_msan_tsearch.cc

Log Message:
compiler-rt-netbsd: Sync patches with my local copy

There are currently 11 patches pending upstream.

D41023 Add NetBSD/x86_64 mapping in MSan
D41022 Register NetBSD/x86_64 in MemorySanitizer.cpp
D41021 Don't link NetBSD programs with -ldl in linkXRayRuntimeDeps
D41019 NetBSD ships with POSIX strerror_r(3)
D41018 Disable test/msan/ftime.cc on NetBSD
D41017 Fix test/msan/iconv.cc on NetBSD
D41015 Fix test/msan/ifaddrs.cc for NetBSD
D41014 Disable test/msan/pvalloc.cc on NetBSD
D41013 Fix test/msan/textdomain.cc on NetBSD
D41011 Disable test/msan/tsearch.cc on NetBSD
D40159 Correct handling of the TLS/NetBSD block of the main program

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=957886bda3520702331131cc6b40fd1c85e36459

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 compiler-rt-netbsd/distinfo                               | 11 ++++++++++-
 compiler-rt-netbsd/patches/patch-lib_msan_msan.h          |  2 +-
 .../patches/patch-lib_msan_msan__allocator.cc             | 14 ++++++++++++++
 .../patches/patch-lib_msan_msan__interceptors.cc          |  0
 ..._sanitizer__common_sanitizer__common__interceptors.inc | 13 +++++++++++++
 compiler-rt-netbsd/patches/patch-test_msan_ftime.cc       | 14 ++++++++++++++
 compiler-rt-netbsd/patches/patch-test_msan_iconv.cc       | 15 +++++++++++++++
 compiler-rt-netbsd/patches/patch-test_msan_ifaddrs.cc     | 13 +++++++++++++
 compiler-rt-netbsd/patches/patch-test_msan_pvalloc.cc     | 13 +++++++++++++
 compiler-rt-netbsd/patches/patch-test_msan_textdomain.cc  | 10 ++++++++++
 compiler-rt-netbsd/patches/patch-test_msan_tsearch.cc     | 13 +++++++++++++
 11 files changed, 116 insertions(+), 2 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index ac1cc22da7..278745a7f5 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -2,8 +2,17 @@ $NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
 
 SHA1 (patch-cmake_config-ix.cmake) = 5068232331d541c2786f01960a80e59252b1ad2c
 SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 38ca750154dfc9843a56748078235824b772a147
-SHA1 (patch-lib_msan_msan.h) = 1ee0f86ccb410561d381afba526c85aa5dace912
+SHA1 (patch-lib_msan_msan.h) = 463509082f0b194f9439556632f37c637648802b
+SHA1 (patch-lib_msan_msan__allocator.cc) = 582608180d48dc03cf5d89572489f522c36978f4
+SHA1 (patch-lib_msan_msan__interceptors.cc) = da39a3ee5e6b4b0d3255bfef95601890afd80709
 SHA1 (patch-lib_msan_msan__linux.cc) = d75d7587071a9e7a3f6a08a3008af55319e62cab
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = ce8def76d88934a27cbb2f046c217368c83a7150
 SHA1 (patch-lib_scudo_scudo__platform.h) = b3c23678b264ec7568c800bc95e949f1a9b65399
 SHA1 (patch-test_lsan_lit.common.cfg) = 10dc251f80efb96d015a22c740dc20b1843b9a11
+SHA1 (patch-test_msan_ftime.cc) = e64d83c7e8363ac1901ac2ad7a38919c0607fa0b
+SHA1 (patch-test_msan_iconv.cc) = 6566cb3aadd7a185e1217372aa5e7a90b974bc3b
+SHA1 (patch-test_msan_ifaddrs.cc) = e4e018d64211acc134fed798d27dee47d2149313
+SHA1 (patch-test_msan_pvalloc.cc) = ca170027cec694bf0aeda310eee6c12bcf5ed41d
+SHA1 (patch-test_msan_textdomain.cc) = bfb79f49ea6a48e910684f0faee50111f5aa2532
+SHA1 (patch-test_msan_tsearch.cc) = 093f32664509723bc4f9177bdd97300843cffa4f
 SHA1 (patch-test_scudo_lit.cfg) = 171f340505f7c87f74a7814b9c4d12d7fcbc5690
diff --git a/compiler-rt-netbsd/patches/patch-lib_msan_msan.h b/compiler-rt-netbsd/patches/patch-lib_msan_msan.h
index a39ee5b74b..53833ca9ee 100644
--- a/compiler-rt-netbsd/patches/patch-lib_msan_msan.h
+++ b/compiler-rt-netbsd/patches/patch-lib_msan_msan.h
@@ -7,7 +7,7 @@ $NetBSD$
  #define SHADOW_TO_ORIGIN(shadow) (((uptr)(shadow)) + 0x280000000000)
  
 -#elif SANITIZER_LINUX && SANITIZER_WORDSIZE == 64
-+#elif SANITIZER_LINUX && SANITIZER_WORDSIZE == 64 || SANITIZER_NETBSD
++#elif SANITIZER_NETBSD || (SANITIZER_LINUX && SANITIZER_WORDSIZE == 64)
  
  #ifdef MSAN_LINUX_X86_64_OLD_MAPPING
  // Requries PIE binary and ASLR enabled.
diff --git a/compiler-rt-netbsd/patches/patch-lib_msan_msan__allocator.cc b/compiler-rt-netbsd/patches/patch-lib_msan_msan__allocator.cc
new file mode 100644
index 0000000000..2f57122d9d
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_msan_msan__allocator.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- lib/msan/msan_allocator.cc.orig	2017-10-17 18:35:51.000000000 +0000
++++ lib/msan/msan_allocator.cc
+@@ -62,7 +62,8 @@ struct MsanMapUnmapCallback {
+   };
+   typedef SizeClassAllocator32<AP32> PrimaryAllocator;
+ #elif defined(__x86_64__)
+-#if SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING)
++#if SANITIZER_NETBSD || \
++    (SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING))
+   static const uptr kAllocatorSpace = 0x700000000000ULL;
+ #else
+   static const uptr kAllocatorSpace = 0x600000000000ULL;
diff --git a/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
new file mode 100644
index 0000000000..5161fe8c93
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2017-12-04 19:21:19.000000000 +0000
++++ lib/sanitizer_common/sanitizer_common_interceptors.inc
+@@ -3413,7 +3413,7 @@ INTERCEPTOR(char *, strerror, int errnum
+ //  * GNU version returns message pointer, which points to either buf or some
+ //    static storage.
+ #if ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || \
+-    SANITIZER_MAC || SANITIZER_ANDROID
++    SANITIZER_MAC || SANITIZER_ANDROID || SANITIZER_NETBSD
+ // POSIX version. Spec is not clear on whether buf is NULL-terminated.
+ // At least on OSX, buf contents are valid even when the call fails.
+ INTERCEPTOR(int, strerror_r, int errnum, char *buf, SIZE_T buflen) {
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_ftime.cc b/compiler-rt-netbsd/patches/patch-test_msan_ftime.cc
new file mode 100644
index 0000000000..8cf2fc3a58
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_ftime.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- test/msan/ftime.cc.orig	2017-10-17 18:35:26.000000000 +0000
++++ test/msan/ftime.cc
+@@ -1,7 +1,7 @@
+ // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
+ 
+-// ftime() is deprecated on FreeBSD.
+-// XFAIL: freebsd
++// ftime() is deprecated on FreeBSD and NetBSD.
++// UNSUPPORTED: freebsd, netbsd
+ 
+ #include <assert.h>
+ #include <sys/timeb.h>
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_iconv.cc b/compiler-rt-netbsd/patches/patch-test_msan_iconv.cc
new file mode 100644
index 0000000000..f089f2e278
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_iconv.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- test/msan/iconv.cc.orig	2017-10-17 18:35:26.000000000 +0000
++++ test/msan/iconv.cc
+@@ -15,8 +15,8 @@ int main(void) {
+   char inbuf_[100];
+   strcpy(inbuf_, "sample text");
+   char outbuf_[100];
+-#if defined(__FreeBSD__)
+-  // FreeBSD's iconv() expects the 2nd argument be of type 'const char**'.
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++  // Due to old POSIX mistake some OSes expect 2nd argument of iconv() to be of type 'const char**'.
+   const char *inbuf = inbuf_;
+ #else
+   char *inbuf = inbuf_;
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_ifaddrs.cc b/compiler-rt-netbsd/patches/patch-test_msan_ifaddrs.cc
new file mode 100644
index 0000000000..50ce815247
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_ifaddrs.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/msan/ifaddrs.cc.orig	2017-10-17 18:35:26.000000000 +0000
++++ test/msan/ifaddrs.cc
+@@ -10,7 +10,7 @@
+ 
+ #include <vector>
+ 
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/socket.h>  // To define 'struct sockaddr'.
+ #endif
+ 
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_pvalloc.cc b/compiler-rt-netbsd/patches/patch-test_msan_pvalloc.cc
new file mode 100644
index 0000000000..ab0bb4e299
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_pvalloc.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/msan/pvalloc.cc.orig	2017-10-17 18:35:26.000000000 +0000
++++ test/msan/pvalloc.cc
+@@ -4,7 +4,7 @@
+ // RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %run %t psm1 2>&1 | FileCheck %s
+ // RUN: MSAN_OPTIONS=allocator_may_return_null=1     %run %t psm1 2>&1
+ 
+-// UNSUPPORTED: win32, freebsd
++// UNSUPPORTED: win32, freebsd, netbsd
+ 
+ // Checks that pvalloc overflows are caught. If the allocator is allowed to
+ // return null, the errno should be set to ENOMEM.
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_textdomain.cc b/compiler-rt-netbsd/patches/patch-test_msan_textdomain.cc
new file mode 100644
index 0000000000..781bdd3aae
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_textdomain.cc
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- test/msan/textdomain.cc.orig	2017-10-17 18:35:26.000000000 +0000
++++ test/msan/textdomain.cc
+@@ -1,4 +1,4 @@
+-// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
++// RUN: %clangxx_msan -lintl -O0 -g %s -o %t && %run %t
+ 
+ #include <libintl.h>
+ #include <stdio.h>
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_tsearch.cc b/compiler-rt-netbsd/patches/patch-test_msan_tsearch.cc
new file mode 100644
index 0000000000..d653b2d3f0
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_tsearch.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/msan/tsearch.cc.orig	2017-10-17 18:35:26.000000000 +0000
++++ test/msan/tsearch.cc
+@@ -1,5 +1,8 @@
+ // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
+ 
++// tdestroy is a GNU extension
++// UNSUPPORTED: netbsd
++
+ #include <assert.h>
+ #include <search.h>
+ #include <stdlib.h>


Home | Main Index | Thread Index | Old Index