pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Start splitting posix and netbsd code
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sun Aug 27 08:59:17 2017 +0200
Changeset: f89e712b0ca912fa50a9c23b8de59b370abdeeb4
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc
compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc
Added Files:
compiler-rt-netbsd/patches/patch-lib_lsan_lsan__interceptors.cc
Log Message:
compiler-rt-netbsd: Start splitting posix and netbsd code
On demand from upstream split NetBSD from sanitizer_platform_limits_posix.h.
Part 5.
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=f89e712b0ca912fa50a9c23b8de59b370abdeeb4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 7 +++--
.../patches/patch-lib_lsan_lsan__interceptors.cc | 16 ++++++++++
...__common_sanitizer__platform__limits__netbsd.cc | 15 ++--------
.../patch-lib_tsan_rtl_tsan__interceptors.cc | 34 +++++++++++++++-------
.../patch-lib_tsan_rtl_tsan__platform__linux.cc | 15 ++++++++--
5 files changed, 57 insertions(+), 30 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index d7c7e35d8d..6e9ce2eac4 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -20,17 +20,18 @@ SHA1 (patch-lib_fuzzer_FuzzerExtraCounters.cpp) = 52fefa927397acd7e83df06df7ec13
SHA1 (patch-lib_fuzzer_FuzzerUtilLinux.cpp) = 30e0ead2deb98ac0a7f67403c47044ef6ec16185
SHA1 (patch-lib_fuzzer_afl_afl__driver.cpp) = a114e28152558b7147d0931eb638109c3d2f32a2
SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = eaffd9f8f2621ad465b5c734a764bdff0243af3d
+SHA1 (patch-lib_lsan_lsan__interceptors.cc) = 04cb038163d9d9eb098666d394bfca38e9f78a2f
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = e031b35f1cbdcc95184f9cae81c548b9b8aa32fd
SHA1 (patch-lib_sanitizer__common_sanitizer__linux.h) = bcf367307bc52f1185a099fdb488c1e6f485dbde
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = f179544393a9a884ab669c10f323539f80d8efad
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 1c87fbccf0f3fe52e822b6437f456ffcf5d05e49
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 90918b75a4a3f4697c24f1f753a50212f58a7b7c
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 222d699a5af20899d45b54b8746f9a514e0ffe35
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 86d872c585bfde552276a5f3e3d198338663bafd
SHA1 (patch-lib_sanitizer__common_sanitizer__posix.h) = e3c6e3f438dbc0911ec54f24bb5a325afe07fbe1
SHA1 (patch-lib_sanitizer__common_sanitizer__posix__libcdep.cc) = 24be4a422f108c24fd095ef725a3b3b582553e66
SHA1 (patch-lib_tsan_go_buildgo.sh) = fe64b3389bbf6ae2ddf187df3e0600b2f817f51d
-SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = 557018c2dce673756215ebf9f1564866df555444
-SHA1 (patch-lib_tsan_rtl_tsan__platform__linux.cc) = 4269acd5ea1d1f448fb9a7a31def2f84a03b27da
+SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = feeaf47e154105201240af271c0187f146961523
+SHA1 (patch-lib_tsan_rtl_tsan__platform__linux.cc) = e572f99e72257dbaa17838378b34cde40e91bd54
SHA1 (patch-lib_tsan_rtl_tsan__rtl__amd64.S) = 95591667c23372ceb72334b2ceae800d32574ac6
SHA1 (patch-lib_tsan_tests_rtl_tsan__test__util__posix.cc) = 302c72dab4fe5a0c94d7de0d728033e616811e5e
SHA1 (patch-test_tsan_lit.cfg) = c849d08c3df59a3de45c6515e05c3d9fac5424e7
diff --git a/compiler-rt-netbsd/patches/patch-lib_lsan_lsan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_lsan_lsan__interceptors.cc
new file mode 100644
index 0000000000..ea9cad6b3d
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_lsan_lsan__interceptors.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- lib/lsan/lsan_interceptors.cc.orig 2017-08-21 23:23:37.000000000 +0000
++++ lib/lsan/lsan_interceptors.cc
+@@ -20,7 +20,11 @@
+ #include "sanitizer_common/sanitizer_internal_defs.h"
+ #include "sanitizer_common/sanitizer_linux.h"
+ #include "sanitizer_common/sanitizer_platform_interceptors.h"
++#if SANITIZER_NETBSD
++#include "sanitizer_common/sanitizer_platform_limits_netbsd.h"
++#else
+ #include "sanitizer_common/sanitizer_platform_limits_posix.h"
++#endif
+ #include "sanitizer_common/sanitizer_posix.h"
+ #include "sanitizer_common/sanitizer_tls_get_addr.h"
+ #include "lsan.h"
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
index bd74ebe71f..3df0628fc3 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
@@ -1,8 +1,8 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig 2017-08-27 06:20:41.501062305 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig 2017-08-27 06:51:29.495207732 +0000
+++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
-@@ -0,0 +1,372 @@
+@@ -0,0 +1,361 @@
+//===-- sanitizer_platform_limits_posix.cc --------------------------------===//
+//
+// The LLVM Compiler Infrastructure
@@ -363,15 +363,4 @@ $NetBSD$
+CHECK_SIZE_AND_OFFSET(group, gr_gid);
+CHECK_SIZE_AND_OFFSET(group, gr_mem);
+
-+CHECK_TYPE_SIZE(XDR);
-+CHECK_SIZE_AND_OFFSET(XDR, x_op);
-+CHECK_SIZE_AND_OFFSET(XDR, x_ops);
-+CHECK_SIZE_AND_OFFSET(XDR, x_public);
-+CHECK_SIZE_AND_OFFSET(XDR, x_private);
-+CHECK_SIZE_AND_OFFSET(XDR, x_base);
-+CHECK_SIZE_AND_OFFSET(XDR, x_handy);
-+COMPILER_CHECK(__sanitizer_XDR_ENCODE == XDR_ENCODE);
-+COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
-+COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
-+
+#endif // SANITIZER_NETBSD
diff --git a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc
index 430e6f22ad..979dcb429b 100644
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc
@@ -2,7 +2,19 @@ $NetBSD$
--- lib/tsan/rtl/tsan_interceptors.cc.orig 2017-08-03 21:24:38.000000000 +0000
+++ lib/tsan/rtl/tsan_interceptors.cc
-@@ -39,6 +39,13 @@ using namespace __tsan; // NOLINT
+@@ -17,7 +17,11 @@
+ #include "sanitizer_common/sanitizer_errno.h"
+ #include "sanitizer_common/sanitizer_libc.h"
+ #include "sanitizer_common/sanitizer_linux.h"
++#if SANITIZER_NETBSD
++#include "sanitizer_common/sanitizer_platform_limits_netbsd.h"
++#else
+ #include "sanitizer_common/sanitizer_platform_limits_posix.h"
++#endif
+ #include "sanitizer_common/sanitizer_placement_new.h"
+ #include "sanitizer_common/sanitizer_posix.h"
+ #include "sanitizer_common/sanitizer_stacktrace.h"
+@@ -39,6 +43,13 @@ using namespace __tsan; // NOLINT
#define stderr __stderrp
#endif
@@ -16,7 +28,7 @@ $NetBSD$
#if SANITIZER_ANDROID
#define mallopt(a, b)
#endif
-@@ -84,19 +91,25 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free,
+@@ -84,19 +95,25 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free,
extern "C" void *pthread_self();
extern "C" void _exit(int status);
extern "C" int fileno_unlocked(void *stream);
@@ -45,7 +57,7 @@ $NetBSD$
const int EPOLL_CTL_ADD = 1;
#endif
const int SIGILL = 4;
-@@ -105,7 +118,7 @@ const int SIGFPE = 8;
+@@ -105,7 +122,7 @@ const int SIGFPE = 8;
const int SIGSEGV = 11;
const int SIGPIPE = 13;
const int SIGTERM = 15;
@@ -54,7 +66,7 @@ $NetBSD$
const int SIGBUS = 10;
const int SIGSYS = 12;
#else
-@@ -113,7 +126,9 @@ const int SIGBUS = 7;
+@@ -113,7 +130,9 @@ const int SIGBUS = 7;
const int SIGSYS = 31;
#endif
void *const MAP_FAILED = (void*)-1;
@@ -65,7 +77,7 @@ $NetBSD$
const int PTHREAD_BARRIER_SERIAL_THREAD = -1;
#endif
const int MAP_FIXED = 0x10;
-@@ -138,6 +153,15 @@ struct sigaction_t {
+@@ -138,6 +157,15 @@ struct sigaction_t {
__sanitizer_sigset_t sa_mask;
void (*sa_restorer)();
};
@@ -81,7 +93,7 @@ $NetBSD$
#else
struct sigaction_t {
#ifdef __mips__
-@@ -166,7 +190,7 @@ struct sigaction_t {
+@@ -166,7 +194,7 @@ struct sigaction_t {
const sighandler_t SIG_DFL = (sighandler_t)0;
const sighandler_t SIG_IGN = (sighandler_t)1;
const sighandler_t SIG_ERR = (sighandler_t)-1;
@@ -90,7 +102,7 @@ $NetBSD$
const int SA_SIGINFO = 0x40;
const int SIG_SETMASK = 3;
#elif defined(__mips__)
-@@ -282,7 +306,7 @@ void ScopedInterceptor::DisableIgnores()
+@@ -282,7 +310,7 @@ void ScopedInterceptor::DisableIgnores()
}
#define TSAN_INTERCEPT(func) INTERCEPT_FUNCTION(func)
@@ -99,7 +111,7 @@ $NetBSD$
# define TSAN_INTERCEPT_VER(func, ver) INTERCEPT_FUNCTION(func)
#else
# define TSAN_INTERCEPT_VER(func, ver) INTERCEPT_FUNCTION_VER(func, ver)
-@@ -459,7 +483,7 @@ static void SetJmp(ThreadState *thr, upt
+@@ -459,7 +487,7 @@ static void SetJmp(ThreadState *thr, upt
static void LongJmp(ThreadState *thr, uptr *env) {
#ifdef __powerpc__
uptr mangled_sp = env[0];
@@ -108,7 +120,7 @@ $NetBSD$
uptr mangled_sp = env[2];
#elif SANITIZER_MAC
# ifdef __aarch64__
-@@ -1345,7 +1369,7 @@ TSAN_INTERCEPTOR(int, __fxstat, int vers
+@@ -1345,7 +1373,7 @@ TSAN_INTERCEPTOR(int, __fxstat, int vers
#endif
TSAN_INTERCEPTOR(int, fstat, int fd, void *buf) {
@@ -117,7 +129,7 @@ $NetBSD$
SCOPED_TSAN_INTERCEPTOR(fstat, fd, buf);
if (fd > 0)
FdAccess(thr, pc, fd);
-@@ -1926,7 +1950,7 @@ TSAN_INTERCEPTOR(int, sigaction, int sig
+@@ -1926,7 +1954,7 @@ TSAN_INTERCEPTOR(int, sigaction, int sig
sigactions[sig].sa_flags = *(volatile int*)&act->sa_flags;
internal_memcpy(&sigactions[sig].sa_mask, &act->sa_mask,
sizeof(sigactions[sig].sa_mask));
@@ -126,7 +138,7 @@ $NetBSD$
sigactions[sig].sa_restorer = act->sa_restorer;
#endif
sigaction_t newact;
-@@ -2288,7 +2312,7 @@ struct ScopedSyscall {
+@@ -2288,7 +2316,7 @@ struct ScopedSyscall {
}
};
diff --git a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc
index f7cb9d9d1c..551ac30926 100644
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc
@@ -2,7 +2,7 @@ $NetBSD$
--- lib/tsan/rtl/tsan_platform_linux.cc.orig 2017-07-16 22:40:10.000000000 +0000
+++ lib/tsan/rtl/tsan_platform_linux.cc
-@@ -14,7 +14,7 @@
+@@ -14,12 +14,16 @@
#include "sanitizer_common/sanitizer_platform.h"
@@ -11,7 +11,16 @@ $NetBSD$
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_libc.h"
-@@ -62,7 +62,7 @@
+ #include "sanitizer_common/sanitizer_linux.h"
++#if SANITIZER_NETBSD
++#include "sanitizer_common/sanitizer_platform_limits_netbsd.h"
++#else
+ #include "sanitizer_common/sanitizer_platform_limits_posix.h"
++#endif
+ #include "sanitizer_common/sanitizer_posix.h"
+ #include "sanitizer_common/sanitizer_procmaps.h"
+ #include "sanitizer_common/sanitizer_stoptheworld.h"
+@@ -62,7 +66,7 @@
# undef sa_sigaction
#endif
@@ -20,7 +29,7 @@ $NetBSD$
extern "C" void *__libc_stack_end;
void *__libc_stack_end = 0;
#endif
-@@ -401,4 +401,4 @@ void cur_thread_finalize() {
+@@ -401,4 +405,4 @@ void cur_thread_finalize() {
} // namespace __tsan
Home |
Main Index |
Thread Index |
Old Index