pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Sync with local patches
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed Jan 17 20:18:09 2018 +0100
Changeset: 4d93a2187af02bb16253671787d500168905493e
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
Added Files:
compiler-rt-netbsd/patches/patch-test_msan_access.cc
compiler-rt-netbsd/patches/patch-test_msan_faccessat.cc
compiler-rt-netbsd/patches/patch-test_msan_getgrouplist.cc
compiler-rt-netbsd/patches/patch-test_msan_getgroupmembership.cc
compiler-rt-netbsd/patches/patch-test_msan_gid__from__group.cc
compiler-rt-netbsd/patches/patch-test_msan_group__from__gid.cc
compiler-rt-netbsd/patches/patch-test_msan_uid__from__user.cc
compiler-rt-netbsd/patches/patch-test_msan_user__from__uid.cc
Log Message:
compiler-rt-netbsd: Sync with local patches
Apply changes from review:
Fixes in the interceptors and add new 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=4d93a2187af02bb16253671787d500168905493e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 26 +++++---
...atch-include_sanitizer_netbsd__syscall__hooks.h | 2 +-
.../patches/patch-lib_fuzzer_tests_CMakeLists.txt | 2 +-
...zer__common_sanitizer__common__interceptors.inc | 71 ++++++++++++----------
...mmon_sanitizer__netbsd__interceptors__ioctl.inc | 2 +-
...nitizer__common_sanitizer__netbsd__syscalls.inc | 2 +-
...zer__common_sanitizer__platform__interceptors.h | 2 +-
compiler-rt-netbsd/patches/patch-test_asan_lit.cfg | 2 +-
.../patches/patch-test_msan_access.cc | 11 ++++
.../patches/patch-test_msan_faccessat.cc | 12 ++++
.../patches/patch-test_msan_getgrouplist.cc | 35 +++++++++++
.../patches/patch-test_msan_getgroupmembership.cc | 36 +++++++++++
.../patches/patch-test_msan_gid__from__group.cc | 22 +++++++
.../patches/patch-test_msan_group__from__gid.cc | 23 +++++++
.../patches/patch-test_msan_uid__from__user.cc | 22 +++++++
.../patches/patch-test_msan_user__from__uid.cc | 23 +++++++
.../patch-utils_generate__netbsd__ioctls.awk | 2 +-
.../patch-utils_generate__netbsd__syscalls.awk | 2 +-
18 files changed, 248 insertions(+), 49 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 2f56c24710..5f0ffb2046 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -2,28 +2,36 @@ $NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
SHA1 (patch-cmake_config-ix.cmake) = 11195c8254c84d5972a2ffee8a9e66758ab7105b
SHA1 (patch-include_CMakeLists.txt) = b6f2713b7e5337aed542442936b6f747efe0a607
-SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = f0ba84c8d81711047cb74e613c9ef1038bed9579
+SHA1 (patch-include_sanitizer_netbsd__syscall__hooks.h) = c70de5bcd424bcf38d1cdfca48eec1beae96512e
SHA1 (patch-lib_asan_asan__interceptors.cc) = ea4005ce02775060ff52af76d568c450892067b5
SHA1 (patch-lib_esan_esan__interceptors.cpp) = a7103ca053e92a810c87c593262bb386f3d02606
-SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = a4cc85d3bda79e8814b5add42cf165190e15f2f0
+SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 9b56e571339ae86306f0d14bce98f782426679e5
SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = c49ab3759728bbd3e27580a3d0d3e2db0bceb2a6
SHA1 (patch-lib_msan_msan__interceptors.cc) = 9f0c1a05430314581b1711f1d5a1ab8870053879
SHA1 (patch-lib_msan_msan__linux.cc) = d75d7587071a9e7a3f6a08a3008af55319e62cab
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = fcbf2987ccab5258fe760aef6ef47bd97e0e0b2c
-SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = f8058c627c83ed65699684064a52d00357ec6905
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 2af1e6f57837ee53d5f347448fd84d553efdc0a0
SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors__ioctl.inc) = 231f519a0564aa69d746a7f0bbee1b1aeed927a7
SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 2ff74de8be0825ca4162969cb2ed367654934a17
SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = b1057f01ae2f03498613eb1a02501c8a65d16fed
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = b6464555f7409405c025367a6e64a5b8309ece74
-SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = a71057aef68211fb57f0efe444db2f44f1216ea5
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 7349731082eb4a4e6744456cb1144256b17c6bc8
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc) = 1e543eec7d74d9dc2b384b88152d6b34f29504e7
+SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc) = 35a57b8dff5d93a0044202785f78dc7c8b94eb33
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 3b4032ca16b3d21bab8469d867f980c3745def5b
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 47236661e37673d66a52e80c3f55be13029014ca
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 2441d51ba207b067a52b7688076335bb38ad0bb9
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc) = 7e0deaeeada33bd13575251e5d8fb4a0ee4c53e8
SHA1 (patch-lib_scudo_scudo__platform.h) = 6b07d34d5f1209c7f1bf21fdf0cda5cbe88b802f
SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = 4fbaa64e3f8d28cdbab6783c296dfd31cecb45a5
-SHA1 (patch-test_asan_lit.cfg) = b5a1fc8725a46ac7bee2f08bdd92ad9a9a31fbcf
+SHA1 (patch-test_asan_lit.cfg) = f7a52f504286ae8a69a4b683210ad6b51f433bc6
SHA1 (patch-test_lsan_lit.common.cfg) = 10dc251f80efb96d015a22c740dc20b1843b9a11
+SHA1 (patch-test_msan_access.cc) = eb18343c50da9c9db27e2d5825a686e2e9bad002
+SHA1 (patch-test_msan_faccessat.cc) = c8f051dd2f740345a47c2cd8345f54815be37fa0
+SHA1 (patch-test_msan_getgrouplist.cc) = 331ab66e41dfd72db164a2fb1aa2cb9d6b18cbdd
+SHA1 (patch-test_msan_getgroupmembership.cc) = 3e5c4626941047fa274ebaa1ce63982b93c29182
+SHA1 (patch-test_msan_gid__from__group.cc) = 498edcf846c50495a26397c37e48bada1e5d495f
+SHA1 (patch-test_msan_group__from__gid.cc) = acbfe5d56e80e5c91bfef8ec6d00aa51cbfbe9c0
+SHA1 (patch-test_msan_uid__from__user.cc) = bf7f2ba4fe32ee0eb0fd30790383e750380c9736
+SHA1 (patch-test_msan_user__from__uid.cc) = f5eb0afcbb6ae04914496cf221e547e73500b078
SHA1 (patch-test_scudo_lit.cfg) = 171f340505f7c87f74a7814b9c4d12d7fcbc5690
-SHA1 (patch-utils_generate__netbsd__ioctls.awk) = 05d72ac7c783d60c0e8eb7b3760d210d31e5d433
-SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 597b8b9c52ba8d000b90589abddd478ba382dde0
+SHA1 (patch-utils_generate__netbsd__ioctls.awk) = 16688dc1438666a6da0d8d8388393ef6288628fa
+SHA1 (patch-utils_generate__netbsd__syscalls.awk) = 929df80dc4a7bb2d743d30a13271517eb6904a28
diff --git a/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h b/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
index 0212065608..4db72fc209 100644
--- a/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
+++ b/compiler-rt-netbsd/patches/patch-include_sanitizer_netbsd__syscall__hooks.h
@@ -1,6 +1,6 @@
$NetBSD$
---- include/sanitizer/netbsd_syscall_hooks.h.orig 2018-01-17 14:43:16.027644634 +0000
+--- include/sanitizer/netbsd_syscall_hooks.h.orig 2018-01-17 19:17:09.376020239 +0000
+++ include/sanitizer/netbsd_syscall_hooks.h
@@ -0,0 +1,4730 @@
+//===-- netbsd_syscall_hooks.h --------------------------------------------===//
diff --git a/compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt b/compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt
index ced2fd4a56..a201a774ef 100644
--- a/compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt
+++ b/compiler-rt-netbsd/patches/patch-lib_fuzzer_tests_CMakeLists.txt
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/fuzzer/tests/CMakeLists.txt.orig 2018-01-17 14:42:51.596169898 +0000
+--- lib/fuzzer/tests/CMakeLists.txt.orig 2018-01-17 14:42:51.000000000 +0000
+++ lib/fuzzer/tests/CMakeLists.txt
@@ -10,6 +10,9 @@ add_custom_target(FuzzerUnitTests)
set_target_properties(FuzzerUnitTests PROPERTIES FOLDER "Compiler-RT Tests")
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
index 66aa73e33e..9f0e1596bd 100644
--- 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
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig 2018-01-17 14:42:51.590090912 +0000
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig 2018-01-17 14:42:51.000000000 +0000
+++ lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -36,6 +36,7 @@
// COMMON_INTERCEPTOR_MEMCPY_IMPL
@@ -174,7 +174,7 @@ $NetBSD$
return res;
}
-@@ -6476,6 +6527,614 @@ INTERCEPTOR(int, acct, const char *file)
+@@ -6476,6 +6527,620 @@ INTERCEPTOR(int, acct, const char *file)
#define INIT_ACCT
#endif
@@ -488,7 +488,7 @@ $NetBSD$
+ return name;
+}
+
-+INTERCEPTOR(int, devname_r, u64 dev, u32 type, char *path, uptr len) {
++INTERCEPTOR(int, devname_r, u64 dev, u32 type, const char *path, uptr len) {
+ void *ctx;
+ int res;
+ COMMON_INTERCEPTOR_ENTER(ctx, devname_r, dev, type, path, len);
@@ -580,31 +580,36 @@ $NetBSD$
+#endif
+
+#if SANITIZER_INTERCEPT_GETGROUPLIST
-+INTERCEPTOR(int, getgrouplist, char *name, u32 basegid, u32 *groups,
++INTERCEPTOR(int, getgrouplist, const char *name, u32 basegid, u32 *groups,
+ int *ngroups) {
+ void *ctx;
+ int res;
+ COMMON_INTERCEPTOR_ENTER(ctx, getgrouplist, name, basegid, groups, ngroups);
-+ if (name) {
++ if (name)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, name, REAL(strlen)(name) + 1);
-+ }
++ if (ngroups)
++ COMMON_INTERCEPTOR_READ_RANGE(ctx, ngroups, sizeof(*ngroups));
+ res = REAL(getgrouplist)(name, basegid, groups, ngroups);
-+ if (groups && ngroups)
++ if (!res && groups && ngroups) {
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, groups, sizeof(*groups) * (*ngroups));
++ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ngroups, sizeof(*ngroups));
++ }
+ return res;
+}
++
+INTERCEPTOR(int, getgroupmembership, char *name, u32 basegid, u32 *groups,
+ int maxgrp, int *ngroups) {
+ void *ctx;
+ int res;
+ COMMON_INTERCEPTOR_ENTER(ctx, getgroupmembership, name, basegid, groups,
+ maxgrp, ngroups);
-+ if (name) {
++ if (name)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, name, REAL(strlen)(name) + 1);
-+ }
+ res = REAL(getgroupmembership)(name, basegid, groups, maxgrp, ngroups);
-+ if (groups && ngroups)
++ if (!res && groups && ngroups) {
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, groups, sizeof(*groups) * (*ngroups));
++ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ngroups, sizeof(*ngroups));
++ }
+ return res;
+}
+
@@ -616,12 +621,11 @@ $NetBSD$
+#endif
+
+#if SANITIZER_INTERCEPT_ACCESS
-+INTERCEPTOR(int, access, char *path, int mode) {
++INTERCEPTOR(int, access, const char *path, int mode) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, access, path, mode);
-+ if (path) {
++ if (path)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, path, REAL(strlen)(path) + 1);
-+ }
+ return REAL(access)(path, mode);
+}
+#define INIT_ACCESS COMMON_INTERCEPT_FUNCTION(access)
@@ -630,12 +634,11 @@ $NetBSD$
+#endif
+
+#if SANITIZER_INTERCEPT_FACCESSAT
-+INTERCEPTOR(int, faccessat, int fd, char *path, int mode, int flags) {
++INTERCEPTOR(int, faccessat, int fd, const char *path, int mode, int flags) {
+ void *ctx;
+ COMMON_INTERCEPTOR_ENTER(ctx, faccessat, fd, path, mode, flags);
-+ if (path) {
++ if (path)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, path, REAL(strlen)(path) + 1);
-+ }
+ return REAL(faccessat)(fd, path, mode, flags);
+}
+#define INIT_FACCESSAT COMMON_INTERCEPT_FUNCTION(faccessat)
@@ -658,14 +661,13 @@ $NetBSD$
+#endif
+
+#if SANITIZER_INTERCEPT_USER_FROM_UID
-+INTERCEPTOR(char *, user_from_uid, u32 uid, int nouser) {
++INTERCEPTOR(const char *, user_from_uid, u32 uid, int nouser) {
+ void *ctx;
-+ char *user;
++ const char *user;
+ COMMON_INTERCEPTOR_ENTER(ctx, user_from_uid, uid, nouser);
+ user = REAL(user_from_uid)(uid, nouser);
-+ if (user) {
++ if (user)
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, user, REAL(strlen)(user) + 1);
-+ }
+ return user;
+}
+#define INIT_USER_FROM_UID COMMON_INTERCEPT_FUNCTION(user_from_uid)
@@ -674,14 +676,16 @@ $NetBSD$
+#endif
+
+#if SANITIZER_INTERCEPT_UID_FROM_USER
-+INTERCEPTOR(int, uid_from_user, char *name, u32 *uid) {
++INTERCEPTOR(int, uid_from_user, const char *name, u32 *uid) {
+ void *ctx;
++ int res;
+ COMMON_INTERCEPTOR_ENTER(ctx, uid_from_user, name, uid);
+ if (name)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, name, REAL(strlen)(name) + 1);
-+ if (uid)
-+ COMMON_INTERCEPTOR_READ_RANGE(ctx, uid, sizeof(*uid));
-+ return REAL(uid_from_user)(name, uid);
++ res = REAL(uid_from_user)(name, uid);
++ if (res != -1 && uid)
++ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, uid, sizeof(*uid));
++ return res;
+}
+#define INIT_UID_FROM_USER COMMON_INTERCEPT_FUNCTION(uid_from_user)
+#else
@@ -689,9 +693,9 @@ $NetBSD$
+#endif
+
+#if SANITIZER_INTERCEPT_GROUP_FROM_GID
-+INTERCEPTOR(char *, group_from_gid, u32 gid, int nogroup) {
++INTERCEPTOR(const char *, group_from_gid, u32 gid, int nogroup) {
+ void *ctx;
-+ char *group;
++ const char *group;
+ COMMON_INTERCEPTOR_ENTER(ctx, group_from_gid, gid, nogroup);
+ group = REAL(group_from_gid)(gid, nogroup);
+ if (group) {
@@ -705,14 +709,16 @@ $NetBSD$
+#endif
+
+#if SANITIZER_INTERCEPT_GID_FROM_GROUP
-+INTERCEPTOR(int, gid_from_group, char *group, u32 *gid) {
++INTERCEPTOR(int, gid_from_group, const char *group, u32 *gid) {
+ void *ctx;
++ int res;
+ COMMON_INTERCEPTOR_ENTER(ctx, gid_from_group, group, gid);
+ if (group)
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, group, REAL(strlen)(group) + 1);
-+ if (gid)
-+ COMMON_INTERCEPTOR_READ_RANGE(ctx, gid, sizeof(*gid));
-+ return REAL(gid_from_group)(group, gid);
++ res = REAL(gid_from_group)(group, gid);
++ if (res != -1 && gid)
++ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, gid, sizeof(*gid));
++ return res;
+}
+#define INIT_GID_FROM_USER COMMON_INTERCEPT_FUNCTION(gid_from_group)
+#else
@@ -789,7 +795,7 @@ $NetBSD$
static void InitializeCommonInterceptors() {
static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1];
interceptor_metadata_map = new((void *)&metadata_mem) MetadataHashMap();
-@@ -6555,6 +7214,7 @@ static void InitializeCommonInterceptors
+@@ -6555,6 +7220,7 @@ static void InitializeCommonInterceptors
INIT_GETSOCKOPT;
INIT_ACCEPT;
INIT_ACCEPT4;
@@ -797,7 +803,7 @@ $NetBSD$
INIT_MODF;
INIT_RECVMSG;
INIT_SENDMSG;
-@@ -6688,6 +7348,20 @@ static void InitializeCommonInterceptors
+@@ -6688,6 +7354,21 @@ static void InitializeCommonInterceptors
INIT_WCSLEN;
INIT_WCSCAT;
INIT_ACCT;
@@ -815,6 +821,7 @@ $NetBSD$
+ INIT_GID_FROM_USER;
+ INIT_GETTTYENT;
+ INIT_FGETLN;
++ INIT_GETGROUPLIST;
#if SANITIZER_NETBSD
COMMON_INTERCEPT_FUNCTION(__libc_mutex_lock);
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
index 5127f0bce2..149e436c85 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__interceptors__ioctl.inc
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc.orig 2018-01-17 14:43:16.030408097 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc.orig 2018-01-17 19:17:09.378801493 +0000
+++ lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc
@@ -0,0 +1,1490 @@
+//===-- sanitizer_common_interceptors_ioctl.inc -----------------*- C++ -*-===//
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
index 8e8287e7ce..e4820e9059 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__netbsd__syscalls.inc
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig 2018-01-17 14:43:16.031258790 +0000
+--- lib/sanitizer_common/sanitizer_netbsd_syscalls.inc.orig 2018-01-17 19:17:09.379638362 +0000
+++ lib/sanitizer_common/sanitizer_netbsd_syscalls.inc
@@ -0,0 +1,3793 @@
+//===-- sanitizer_common_syscalls.inc ---------------------------*- C++ -*-===//
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
index 92aadb1e02..719cf8bb10 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
@@ -1,6 +1,6 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig 2018-01-17 14:42:51.590537504 +0000
+--- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig 2018-01-17 14:42:51.000000000 +0000
+++ lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -217,7 +217,8 @@
(SI_FREEBSD || SI_LINUX_NOT_ANDROID || SI_SOLARIS)
diff --git a/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg b/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
index 00e0de11f9..5227ff7940 100644
--- a/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
+++ b/compiler-rt-netbsd/patches/patch-test_asan_lit.cfg
@@ -1,6 +1,6 @@
$NetBSD$
---- test/asan/lit.cfg.orig 2018-01-17 14:42:51.220803892 +0000
+--- test/asan/lit.cfg.orig 2018-01-17 14:42:51.000000000 +0000
+++ test/asan/lit.cfg
@@ -209,7 +209,7 @@ else:
config.substitutions.append(('%pie', '-pie'))
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_access.cc b/compiler-rt-netbsd/patches/patch-test_msan_access.cc
new file mode 100644
index 0000000000..5bf53a06cd
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_access.cc
@@ -0,0 +1,11 @@
+$NetBSD$
+
+--- test/msan/access.cc.orig 2018-01-17 19:17:09.381651021 +0000
++++ test/msan/access.cc
+@@ -0,0 +1,6 @@
++// RUN: %clangxx_msan -O0 %s -o %t && %run %t
++// UNSUPPORTED: linux
++
++#include <unistd.h>
++
++int main(void) { return access("/root", F_OK); }
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_faccessat.cc b/compiler-rt-netbsd/patches/patch-test_msan_faccessat.cc
new file mode 100644
index 0000000000..5c546cd781
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_faccessat.cc
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- test/msan/faccessat.cc.orig 2018-01-17 19:17:09.381739846 +0000
++++ test/msan/faccessat.cc
+@@ -0,0 +1,7 @@
++// RUN: %clangxx_msan -O0 %s -o %t && %run %t
++// UNSUPPORTED: linux
++
++#include <fcntl.h>
++#include <unistd.h>
++
++int main(void) { return faccessat(AT_FDCWD, "/root", F_OK, 0); }
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_getgrouplist.cc b/compiler-rt-netbsd/patches/patch-test_msan_getgrouplist.cc
new file mode 100644
index 0000000000..d7658a005c
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_getgrouplist.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+
+--- test/msan/getgrouplist.cc.orig 2018-01-17 19:17:09.381817951 +0000
++++ test/msan/getgrouplist.cc
+@@ -0,0 +1,30 @@
++// RUN: %clangxx_msan -O0 %s -o %t && %run %t
++// UNSUPPORTED: linux
++
++#include <stdlib.h>
++#include <unistd.h>
++#include <grp.h>
++
++int main(void) {
++ gid_t *groups;
++ gid_t nobody;
++ int ngroups;
++
++ ngroups = sysconf(_SC_NGROUPS_MAX);
++ groups = (gid_t *)malloc(ngroups * sizeof(gid_t));
++ if (!groups)
++ exit(1);
++
++ if (gid_from_group("nobody", &nobody) == -1)
++ exit(1);
++
++ if (getgrouplist("nobody", nobody, groups, &ngroups))
++ exit(1);
++
++ if (groups && ngroups) {
++ free(groups);
++ exit(0);
++ }
++
++ return -1;
++}
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_getgroupmembership.cc b/compiler-rt-netbsd/patches/patch-test_msan_getgroupmembership.cc
new file mode 100644
index 0000000000..0bd5f3c0a1
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_getgroupmembership.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- test/msan/getgroupmembership.cc.orig 2018-01-17 19:17:09.381896305 +0000
++++ test/msan/getgroupmembership.cc
+@@ -0,0 +1,31 @@
++// RUN: %clangxx_msan -O0 %s -o %t && %run %t
++// UNSUPPORTED: linux
++
++#include <stdlib.h>
++#include <unistd.h>
++#include <grp.h>
++
++int main(void) {
++ gid_t *groups;
++ gid_t nobody;
++ int ngroups;
++ int maxgrp;
++
++ maxgrp = sysconf(_SC_NGROUPS_MAX);
++ groups = (gid_t *)malloc(maxgrp * sizeof(gid_t));
++ if (!groups)
++ exit(1);
++
++ if (gid_from_group("nobody", &nobody) == -1)
++ exit(1);
++
++ if (getgroupmembership("nobody", nobody, groups, maxgrp, &ngroups))
++ exit(1);
++
++ if (groups && ngroups) {
++ free(groups);
++ exit(0);
++ }
++
++ return -1;
++}
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_gid__from__group.cc b/compiler-rt-netbsd/patches/patch-test_msan_gid__from__group.cc
new file mode 100644
index 0000000000..88c832cdb0
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_gid__from__group.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- test/msan/gid_from_group.cc.orig 2018-01-17 19:17:09.381969377 +0000
++++ test/msan/gid_from_group.cc
+@@ -0,0 +1,17 @@
++// RUN: %clangxx_msan -O0 %s -o %t && %run %t
++// UNSUPPORTED: linux
++
++#include <grp.h>
++#include <stdlib.h>
++
++int main(void) {
++ gid_t nobody;
++
++ if (gid_from_group("nobody", &nobody) == -1)
++ exit(1);
++
++ if (nobody)
++ exit(0);
++
++ return 0;
++}
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_group__from__gid.cc b/compiler-rt-netbsd/patches/patch-test_msan_group__from__gid.cc
new file mode 100644
index 0000000000..5e420ca143
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_group__from__gid.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- test/msan/group_from_gid.cc.orig 2018-01-17 19:17:09.382044436 +0000
++++ test/msan/group_from_gid.cc
+@@ -0,0 +1,18 @@
++// RUN: %clangxx_msan -O0 %s -o %t && %run %t
++// UNSUPPORTED: linux
++
++#include <grp.h>
++#include <stdlib.h>
++#include <string.h>
++
++int main(void) {
++ const char *nobody;
++
++ if (!(nobody = group_from_gid(0, 0)))
++ exit(1);
++
++ if (strlen(nobody))
++ exit(0);
++
++ return 0;
++}
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_uid__from__user.cc b/compiler-rt-netbsd/patches/patch-test_msan_uid__from__user.cc
new file mode 100644
index 0000000000..2677247190
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_uid__from__user.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- test/msan/uid_from_user.cc.orig 2018-01-17 19:17:09.382120353 +0000
++++ test/msan/uid_from_user.cc
+@@ -0,0 +1,17 @@
++// RUN: %clangxx_msan -O0 %s -o %t && %run %t
++// UNSUPPORTED: linux
++
++#include <pwd.h>
++#include <stdlib.h>
++
++int main(void) {
++ uid_t nobody;
++
++ if (uid_from_user("nobody", &nobody) == -1)
++ exit(1);
++
++ if (nobody)
++ exit(0);
++
++ return 0;
++}
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_user__from__uid.cc b/compiler-rt-netbsd/patches/patch-test_msan_user__from__uid.cc
new file mode 100644
index 0000000000..3dfbd403c7
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_user__from__uid.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- test/msan/user_from_uid.cc.orig 2018-01-17 19:17:09.382195279 +0000
++++ test/msan/user_from_uid.cc
+@@ -0,0 +1,18 @@
++// RUN: %clangxx_msan -O0 %s -o %t && %run %t
++// UNSUPPORTED: linux
++
++#include <pwd.h>
++#include <stdlib.h>
++#include <string.h>
++
++int main(void) {
++ const char *nobody;
++
++ if (!(nobody = user_from_uid(0, 0)))
++ exit(1);
++
++ if (strlen(nobody))
++ exit(0);
++
++ return 0;
++}
diff --git a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
index 679f32c605..1364f800dd 100644
--- a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
+++ b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__ioctls.awk
@@ -1,6 +1,6 @@
$NetBSD$
---- utils/generate_netbsd_ioctls.awk.orig 2018-01-17 14:43:16.033483467 +0000
+--- utils/generate_netbsd_ioctls.awk.orig 2018-01-17 19:17:09.382477780 +0000
+++ utils/generate_netbsd_ioctls.awk
@@ -0,0 +1,755 @@
+#!/usr/bin/awk -f
diff --git a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
index 27cbaf6185..fbd1de4389 100644
--- a/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
+++ b/compiler-rt-netbsd/patches/patch-utils_generate__netbsd__syscalls.awk
@@ -1,6 +1,6 @@
$NetBSD$
---- utils/generate_netbsd_syscalls.awk.orig 2018-01-17 14:43:16.034138612 +0000
+--- utils/generate_netbsd_syscalls.awk.orig 2018-01-17 19:17:09.383129425 +0000
+++ utils/generate_netbsd_syscalls.awk
@@ -0,0 +1,2989 @@
+#!/usr/bin/awk -f
Home |
Main Index |
Thread Index |
Old Index