pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Update to SVN r. 332792
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sat May 19 03:27:08 2018 +0200
Changeset: 693e419e7911ee717928f50fb1c12e9d04f008e1
Modified Files:
compiler-rt-netbsd/Makefile
compiler-rt-netbsd/distinfo
Removed Files:
compiler-rt-netbsd/patches/patch-lib_asan_asan__thread.cc
compiler-rt-netbsd/patches/patch-lib_msan_tests_msan__test.cc
compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
Log Message:
compiler-rt-netbsd: Update to SVN r. 332792
Patches merged upstream:
r332792 Align ClearShadowForThreadStackAndTLS for NetBSD/i386
r332791 Port msan_test.cc to NetBSD
r332790 Do not link with -ldl in NetBSD/ASan tests
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=693e419e7911ee717928f50fb1c12e9d04f008e1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/Makefile | 2 +-
compiler-rt-netbsd/distinfo | 3 -
.../patches/patch-lib_asan_asan__thread.cc | 18 -
.../patches/patch-lib_msan_tests_msan__test.cc | 468 ---------------------
compiler-rt-netbsd/patches/patch-test_asan_lit.cfg | 13 -
5 files changed, 1 insertion(+), 503 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index 1b25f0be66..2b8fc245f6 100644
--- a/compiler-rt-netbsd/Makefile
+++ b/compiler-rt-netbsd/Makefile
@@ -5,7 +5,7 @@ CATEGORIES= lang devel
SVN_REPOSITORIES= compiler-rt
SVN_REPO.compiler-rt= http://llvm.org/svn/llvm-project/compiler-rt/trunk
-SVN_REVISION.compiler-rt= 332053
+SVN_REVISION.compiler-rt= 332792
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://compiler-rt.llvm.org/
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index fbb8cb5c5c..41f336bc64 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -3,12 +3,10 @@ $NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
SHA1 (patch-CMakeLists.txt) = f84dd8cb370dce65de45e089d85598f15774fa18
SHA1 (patch-cmake_config-ix.cmake) = 91ffb8c1e65394c7c6e9956379373b28348e3f1f
SHA1 (patch-lib_asan_asan__posix.cc) = 0f596061c078eaab0b5b4b183550aa7820677f46
-SHA1 (patch-lib_asan_asan__thread.cc) = 6408c904c1f3adbebff56aaf63f953f5b8b02bef
SHA1 (patch-lib_fuzzer_FuzzerLoop.cpp) = f658549bdb9b0b875b55e286a0e4df0dd9046117
SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 0e559ebb791942cba9c83f3098d7752f91e1f187
SHA1 (patch-lib_msan_msan__interceptors.cc) = 79bfe137923597d79bb467d0f282d57221079a85
SHA1 (patch-lib_msan_msan__linux.cc) = 6fd2ada4a84d1e1cc47ec8f4e1f0608861c73c1a
-SHA1 (patch-lib_msan_tests_msan__test.cc) = 8f0a40c51a200f5de107cac5bd47db87aeff7c57
SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = a89e76e65e7aa735e4f796505917b4993ccc2662
SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 91f645a6652d895e97b0aefbb62d80e680cd2c39
SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = e4c889d8c140b06cb62429b37d56eca88feaaf03
@@ -21,7 +19,6 @@ SHA1 (patch-lib_scudo_scudo__platform.h) = 119d7ad8f8ca9d3e846dbdd7f805ca771e30e
SHA1 (patch-test_asan_TestCases_Posix_stack-use-after-return.cc) = dea34873ff32e999da657766016a2434430be2ad
SHA1 (patch-test_asan_TestCases_heavy__uar__test.cc) = d271e63af0b399d3e64add96a1b1b1b5e1039d7e
SHA1 (patch-test_asan_TestCases_interception__failure__test.cc) = b4711fcc3315eaacc2a4ec1021e04b8200749e51
-SHA1 (patch-test_asan_lit.cfg) = 16bf28a2625ba69b6d6a1ba96ed7bbf3e17b56a4
SHA1 (patch-test_fuzzer_lit.cfg) = b36c905a14ff1594dac503bc04e08f61d7e843b0
SHA1 (patch-test_lsan_lit.common.cfg) = b09b4ab3a97dc881b701a3583b0b126b8206cfe2
SHA1 (patch-test_scudo_lit.cfg) = 35e4f0524a8fd26e90e5d968b73d75f277da3779
diff --git a/compiler-rt-netbsd/patches/patch-lib_asan_asan__thread.cc b/compiler-rt-netbsd/patches/patch-lib_asan_asan__thread.cc
deleted file mode 100644
index 0fca848eb0..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_asan_asan__thread.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- lib/asan/asan_thread.cc.orig 2018-02-01 23:46:05.000000000 +0000
-+++ lib/asan/asan_thread.cc
-@@ -300,8 +300,11 @@ void AsanThread::SetThreadStackAndTls(co
-
- void AsanThread::ClearShadowForThreadStackAndTLS() {
- PoisonShadow(stack_bottom_, stack_top_ - stack_bottom_, 0);
-- if (tls_begin_ != tls_end_)
-- PoisonShadow(tls_begin_, tls_end_ - tls_begin_, 0);
-+ if (tls_begin_ != tls_end_) {
-+ uptr tls_begin_aligned = RoundDownTo(tls_begin_, SHADOW_GRANULARITY);
-+ uptr tls_end_aligned = RoundUpTo(tls_end_, SHADOW_GRANULARITY);
-+ PoisonShadow(tls_begin_aligned, tls_end_aligned - tls_begin_aligned, 0);
-+ }
- }
-
- bool AsanThread::GetStackFrameAccessByAddr(uptr addr,
diff --git a/compiler-rt-netbsd/patches/patch-lib_msan_tests_msan__test.cc b/compiler-rt-netbsd/patches/patch-lib_msan_tests_msan__test.cc
deleted file mode 100644
index 697be584eb..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_msan_tests_msan__test.cc
+++ /dev/null
@@ -1,468 +0,0 @@
-$NetBSD$
-
---- lib/msan/tests/msan_test.cc.orig 2018-02-01 23:46:00.000000000 +0000
-+++ lib/msan/tests/msan_test.cc
-@@ -65,16 +65,17 @@ int shmdt(const void *);
- #include <sys/ipc.h>
- #include <sys/shm.h>
-
--#if !defined(__FreeBSD__)
--# include <malloc.h>
--# include <sys/sysinfo.h>
--# include <sys/vfs.h>
--# include <mntent.h>
--# include <netinet/ether.h>
--# if defined(__linux__)
--# include <sys/uio.h>
--# endif
--#else
-+#if defined(__NetBSD__)
-+# include <signal.h>
-+# include <netinet/in.h>
-+# include <sys/uio.h>
-+# include <sys/mount.h>
-+# include <sys/sysctl.h>
-+# include <net/if.h>
-+# include <net/if_ether.h>
-+# include <sched.h>
-+# define cpu_set_t cpuset_t
-+#elif defined(__FreeBSD__)
- # include <signal.h>
- # include <netinet/in.h>
- # include <pthread_np.h>
-@@ -90,6 +91,15 @@ extern "C" {
- // ordinary function, we can declare it here to complete the tests.
- void *mempcpy(void *dest, const void *src, size_t n);
- }
-+#else
-+# include <malloc.h>
-+# include <sys/sysinfo.h>
-+# include <sys/vfs.h>
-+# include <mntent.h>
-+# include <netinet/ether.h>
-+# if defined(__linux__)
-+# include <sys/uio.h>
-+# endif
- #endif
-
- #if defined(__i386__) || defined(__x86_64__)
-@@ -103,8 +113,8 @@ void *mempcpy(void *dest, const void *sr
- # include <immintrin.h>
- #endif
-
--// On FreeBSD procfs is not enabled by default.
--#if defined(__FreeBSD__)
-+// On FreeBSD and NetBSD procfs is not enabled by default.
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
- # define FILE_TO_READ "/bin/cat"
- # define DIR_TO_READ "/bin"
- # define SUBFILE_TO_READ "cat"
-@@ -745,6 +755,7 @@ TEST(MemorySanitizer, fstatat) {
- close(dirfd);
- }
-
-+#if !defined(__NetBSD__)
- TEST(MemorySanitizer, statfs) {
- struct statfs st;
- int res = statfs("/", &st);
-@@ -753,6 +764,7 @@ TEST(MemorySanitizer, statfs) {
- EXPECT_NOT_POISONED(st.f_bfree);
- EXPECT_NOT_POISONED(st.f_namelen);
- }
-+#endif
-
- TEST(MemorySanitizer, statvfs) {
- struct statvfs st;
-@@ -829,8 +841,8 @@ TEST(MemorySanitizer, poll) {
- close(pipefd[1]);
- }
-
--// There is no ppoll() on FreeBSD.
--#if !defined (__FreeBSD__)
-+// There is no ppoll() on FreeBSD and NetBSD.
-+#if !defined (__FreeBSD__) && !defined (__NetBSD__)
- TEST(MemorySanitizer, ppoll) {
- int* pipefd = new int[2];
- int res = pipe(pipefd);
-@@ -1168,6 +1180,7 @@ TEST(MemorySanitizer, gethostbyaddr) {
- EXPECT_HOSTENT_NOT_POISONED(he);
- }
-
-+#if !defined(__NetBSD__)
- TEST(MemorySanitizer, gethostent_r) {
- char buf[2000];
- struct hostent he;
-@@ -1180,7 +1193,9 @@ TEST(MemorySanitizer, gethostent_r) {
- EXPECT_HOSTENT_NOT_POISONED(result);
- EXPECT_NOT_POISONED(err);
- }
-+#endif
-
-+#if !defined(__NetBSD__)
- TEST(MemorySanitizer, gethostbyname_r) {
- char buf[2000];
- struct hostent he;
-@@ -1193,7 +1208,9 @@ TEST(MemorySanitizer, gethostbyname_r) {
- EXPECT_HOSTENT_NOT_POISONED(result);
- EXPECT_NOT_POISONED(err);
- }
-+#endif
-
-+#if !defined(__NetBSD__)
- TEST(MemorySanitizer, gethostbyname_r_bad_host_name) {
- char buf[2000];
- struct hostent he;
-@@ -1203,7 +1220,9 @@ TEST(MemorySanitizer, gethostbyname_r_ba
- ASSERT_EQ((struct hostent *)0, result);
- EXPECT_NOT_POISONED(err);
- }
-+#endif
-
-+#if !defined(__NetBSD__)
- TEST(MemorySanitizer, gethostbyname_r_erange) {
- char buf[5];
- struct hostent he;
-@@ -1213,7 +1232,9 @@ TEST(MemorySanitizer, gethostbyname_r_er
- ASSERT_EQ(ERANGE, errno);
- EXPECT_NOT_POISONED(err);
- }
-+#endif
-
-+#if !defined(__NetBSD__)
- TEST(MemorySanitizer, gethostbyname2_r) {
- char buf[2000];
- struct hostent he;
-@@ -1227,7 +1248,9 @@ TEST(MemorySanitizer, gethostbyname2_r)
- EXPECT_HOSTENT_NOT_POISONED(result);
- EXPECT_NOT_POISONED(err);
- }
-+#endif
-
-+#if !defined(__NetBSD__)
- TEST(MemorySanitizer, gethostbyaddr_r) {
- char buf[2000];
- struct hostent he;
-@@ -1243,6 +1266,7 @@ TEST(MemorySanitizer, gethostbyaddr_r) {
- EXPECT_HOSTENT_NOT_POISONED(result);
- EXPECT_NOT_POISONED(err);
- }
-+#endif
-
- TEST(MemorySanitizer, getsockopt) {
- int sock = socket(AF_UNIX, SOCK_STREAM, 0);
-@@ -1269,8 +1293,8 @@ TEST(MemorySanitizer, getcwd_gnu) {
- free(res);
- }
-
--// There's no get_current_dir_name() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no get_current_dir_name() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, get_current_dir_name) {
- char* res = get_current_dir_name();
- ASSERT_TRUE(res != NULL);
-@@ -1289,7 +1313,7 @@ TEST(MemorySanitizer, shmctl) {
- EXPECT_NOT_POISONED(ds);
-
- // FreeBSD does not support shmctl(IPC_INFO) and shmctl(SHM_INFO).
--#if !defined(__FreeBSD__)
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- struct shminfo si;
- res = shmctl(id, IPC_INFO, (struct shmid_ds *)&si);
- ASSERT_GT(res, -1);
-@@ -1337,8 +1361,8 @@ TEST(MemorySanitizer, shmat) {
- ASSERT_GT(res, -1);
- }
-
--// There's no random_r() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no random_r() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, random_r) {
- int32_t x;
- char z[64];
-@@ -1419,7 +1443,7 @@ TEST(MemorySanitizer, realpath_null) {
- }
-
- // There's no canonicalize_file_name() on FreeBSD.
--#if !defined(__FreeBSD__)
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, canonicalize_file_name) {
- const char* relpath = ".";
- char* res = canonicalize_file_name(relpath);
-@@ -1877,8 +1901,8 @@ TEST(MemorySanitizer, modfl) {
- EXPECT_NOT_POISONED(y);
- }
-
--// There's no sincos() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no sincos() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, sincos) {
- double s, c;
- sincos(0.2, &s, &c);
-@@ -1887,8 +1911,8 @@ TEST(MemorySanitizer, sincos) {
- }
- #endif
-
--// There's no sincosf() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no sincosf() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, sincosf) {
- float s, c;
- sincosf(0.2, &s, &c);
-@@ -1897,8 +1921,8 @@ TEST(MemorySanitizer, sincosf) {
- }
- #endif
-
--// There's no sincosl() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no sincosl() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, sincosl) {
- long double s, c;
- sincosl(0.2, &s, &c);
-@@ -1960,8 +1984,8 @@ TEST(MemorySanitizer, lgammaf_r) {
- EXPECT_NOT_POISONED(sgn);
- }
-
--// There's no lgammal_r() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no lgammal_r() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, lgammal_r) {
- int sgn;
- long double res = lgammal_r(1.1, &sgn);
-@@ -1970,8 +1994,8 @@ TEST(MemorySanitizer, lgammal_r) {
- }
- #endif
-
--// There's no drand48_r() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no drand48_r() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, drand48_r) {
- struct drand48_data buf;
- srand48_r(0, &buf);
-@@ -1981,8 +2005,8 @@ TEST(MemorySanitizer, drand48_r) {
- }
- #endif
-
--// There's no lrand48_r() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no lrand48_r() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, lrand48_r) {
- struct drand48_data buf;
- srand48_r(0, &buf);
-@@ -2267,7 +2291,7 @@ TEST(MemorySanitizer, localtime_r) {
- EXPECT_NE(0U, strlen(time.tm_zone));
- }
-
--#if !defined(__FreeBSD__)
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- /* Creates a temporary file with contents similar to /etc/fstab to be used
- with getmntent{_r}. */
- class TempFstabFile {
-@@ -2305,8 +2329,8 @@ class TempFstabFile {
- };
- #endif
-
--// There's no getmntent() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no getmntent() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, getmntent) {
- TempFstabFile fstabtmp;
- ASSERT_TRUE(fstabtmp.Create());
-@@ -2324,8 +2348,8 @@ TEST(MemorySanitizer, getmntent) {
- }
- #endif
-
--// There's no getmntent_r() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no getmntent_r() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, getmntent_r) {
- TempFstabFile fstabtmp;
- ASSERT_TRUE(fstabtmp.Create());
-@@ -2345,6 +2369,7 @@ TEST(MemorySanitizer, getmntent_r) {
- }
- #endif
-
-+#if !defined(__NetBSD__)
- TEST(MemorySanitizer, ether) {
- const char *asc = "11:22:33:44:55:66";
- struct ether_addr *paddr = ether_aton(asc);
-@@ -2363,6 +2388,7 @@ TEST(MemorySanitizer, ether) {
- ASSERT_EQ(s, buf);
- ASSERT_NE(0U, strlen(buf));
- }
-+#endif
-
- TEST(MemorySanitizer, mmap) {
- const int size = 4096;
-@@ -2383,8 +2409,8 @@ TEST(MemorySanitizer, mmap) {
- }
- }
-
--// There's no fcvt() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no fcvt() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- // FIXME: enable and add ecvt.
- // FIXME: check why msandr does nt handle fcvt.
- TEST(MemorySanitizer, fcvt) {
-@@ -2402,8 +2428,8 @@ TEST(MemorySanitizer, fcvt) {
- }
- #endif
-
--// There's no fcvt_long() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no fcvt_long() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, fcvt_long) {
- int a, b;
- break_optimization(&a);
-@@ -2478,11 +2504,15 @@ void SigactionHandler(int signo, siginfo
- ASSERT_TRUE(si != NULL);
- EXPECT_NOT_POISONED(si->si_errno);
- EXPECT_NOT_POISONED(si->si_pid);
--#if __linux__
--# if defined(__x86_64__)
-+#ifdef _UC_MACHINE_PC
-+ EXPECT_NOT_POISONED(_UC_MACHINE_PC((ucontext_t*)uc));
-+#else
-+# if __linux__
-+# if defined(__x86_64__)
- EXPECT_NOT_POISONED(((ucontext_t*)uc)->uc_mcontext.gregs[REG_RIP]);
--# elif defined(__i386__)
-+# elif defined(__i386__)
- EXPECT_NOT_POISONED(((ucontext_t*)uc)->uc_mcontext.gregs[REG_EIP]);
-+# endif
- # endif
- #endif
- ++cnt;
-@@ -3012,7 +3042,9 @@ TEST(MemorySanitizer, LongStruct) {
- EXPECT_POISONED(s2.a8);
- }
-
--#ifdef __GLIBC__
-+#if defined(__NetBSD__)
-+#define MSAN_TEST_PRLIMIT 0
-+#elif defined(__GLIBC__)
- #define MSAN_TEST_PRLIMIT __GLIBC_PREREQ(2, 13)
- #else
- #define MSAN_TEST_PRLIMIT 1
-@@ -3063,9 +3095,13 @@ TEST(MemorySanitizer, getrusage) {
- EXPECT_NOT_POISONED(usage.ru_nivcsw);
- }
-
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
- static void GetProgramPath(char *buf, size_t sz) {
-+#if defined(__FreeBSD__)
- int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
-+#elif defined(__NetBSD__)
-+ int mib[4] = { CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME};
-+#endif
- int res = sysctl(mib, 4, buf, &sz, NULL, 0);
- ASSERT_EQ(0, res);
- }
-@@ -3187,8 +3223,8 @@ TEST(MemorySanitizer, dlopenFailed) {
-
- #endif // MSAN_TEST_DISABLE_DLOPEN
-
--// There's no sched_getaffinity() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no sched_getaffinity() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, sched_getaffinity) {
- cpu_set_t mask;
- int res = sched_getaffinity(getpid(), sizeof(mask), &mask);
-@@ -3336,12 +3372,14 @@ TEST(MemorySanitizer, pthread_attr_get)
- EXPECT_NOT_POISONED(v);
- EXPECT_NOT_POISONED(w);
- }
-+#if !defined(__NetBSD__)
- {
- cpu_set_t v;
- res = pthread_attr_getaffinity_np(&attr, sizeof(v), &v);
- ASSERT_EQ(0, res);
- EXPECT_NOT_POISONED(v);
- }
-+#endif
- res = pthread_attr_destroy(&attr);
- ASSERT_EQ(0, res);
- }
-@@ -3433,8 +3471,8 @@ TEST(MemorySanitizer, posix_memalign) {
- free(p);
- }
-
--// There's no memalign() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no memalign() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, memalign) {
- void *p = memalign(4096, 13);
- EXPECT_EQ(0U, (uintptr_t)p % 4096);
-@@ -3449,8 +3487,8 @@ TEST(MemorySanitizer, valloc) {
- free(a);
- }
-
--// There's no pvalloc() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no pvalloc() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, pvalloc) {
- uintptr_t PageSize = GetPageSize();
- void *p = pvalloc(PageSize + 100);
-@@ -3507,8 +3545,8 @@ TEST(MemorySanitizer, gethostname) {
- EXPECT_NOT_POISONED(strlen(buf));
- }
-
--// There's no sysinfo() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no sysinfo() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, sysinfo) {
- struct sysinfo info;
- int res = sysinfo(&info);
-@@ -3605,8 +3643,8 @@ TEST(MemorySanitizer, getpwent_r) {
- EXPECT_NOT_POISONED(pwdres);
- }
-
--// There's no fgetpwent() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no fgetpwent() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, fgetpwent) {
- FILE *fp = fopen("/etc/passwd", "r");
- struct passwd *p = fgetpwent(fp);
-@@ -3629,8 +3667,8 @@ TEST(MemorySanitizer, getgrent) {
- EXPECT_NOT_POISONED(p->gr_gid);
- }
-
--// There's no fgetgrent() on FreeBSD.
--#if !defined(__FreeBSD__)
-+// There's no fgetgrent() on FreeBSD and NetBSD.
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
- TEST(MemorySanitizer, fgetgrent) {
- FILE *fp = fopen("/etc/group", "r");
- struct group *grp = fgetgrent(fp);
-@@ -4392,12 +4430,14 @@ void MemCpyTest() {
- EXPECT_POISONED_O(y[N/2], ox);
- EXPECT_POISONED_O(y[N-1], ox);
- EXPECT_NOT_POISONED(x);
-+#if !defined(__NetBSD__)
- void *res = mempcpy(q, x, N * sizeof(T));
- ASSERT_EQ(q + N, res);
- EXPECT_POISONED_O(q[0], ox);
- EXPECT_POISONED_O(q[N/2], ox);
- EXPECT_POISONED_O(q[N-1], ox);
- EXPECT_NOT_POISONED(x);
-+#endif
- memmove(z, x, N * sizeof(T));
- EXPECT_POISONED_O(z[0], ox);
- EXPECT_POISONED_O(z[N/2], ox);
diff --git a/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg b/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
deleted file mode 100644
index 735982dd47..0000000000
--- a/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- test/asan/lit.cfg.orig 2018-02-15 16:00:57.000000000 +0000
-+++ test/asan/lit.cfg
-@@ -49,7 +49,7 @@ config.substitutions.append(('%env_asan_
- config.test_source_root = os.path.dirname(__file__)
-
- # There is no libdl on FreeBSD.
--if config.host_os != 'FreeBSD':
-+if config.host_os != 'FreeBSD' and config.host_os != 'NetBSD':
- libdl_flag = "-ldl"
- else:
- libdl_flag = ""
Home |
Main Index |
Thread Index |
Old Index