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. 349619



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Dec 19 15:12:10 2018 +0100
Changeset:	69f44c2de377078220945aaf7736d20ee12f7643

Modified Files:
	compiler-rt-netbsd/Makefile
Removed Files:
	compiler-rt-netbsd/patches/patch-lib_asan_asan__posix.cc

Log Message:
compiler-rt-netbsd: Update to SVN r. 349619

Merged upstream:
[compiler-rt] r349619 - Reimplement Thread Static Data ASan routines with TLS

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=69f44c2de377078220945aaf7736d20ee12f7643

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 +-
 .../patches/patch-lib_asan_asan__posix.cc          | 76 ----------------------
 2 files changed, 1 insertion(+), 77 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index 9077a45932..5b48fbb9e5 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=	349263
+SVN_REVISION.compiler-rt=	349619
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	http://compiler-rt.llvm.org/
diff --git a/compiler-rt-netbsd/patches/patch-lib_asan_asan__posix.cc b/compiler-rt-netbsd/patches/patch-lib_asan_asan__posix.cc
deleted file mode 100644
index d39ff665dc..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_asan_asan__posix.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-$NetBSD$
-
---- lib/asan/asan_posix.cc.orig	2018-08-21 21:25:41.000000000 +0000
-+++ lib/asan/asan_posix.cc
-@@ -30,6 +30,11 @@
- #include <sys/resource.h>
- #include <unistd.h>
- 
-+#if SANITIZER_NETBSD
-+extern "C" int __cxa_thread_atexit(void (*)(void *), void *,
-+                                   void *) SANITIZER_WEAK_ATTRIBUTE;
-+#endif
-+
- namespace __asan {
- 
- void AsanOnDeadlySignal(int signo, void *siginfo, void *context) {
-@@ -40,6 +45,51 @@ void AsanOnDeadlySignal(int signo, void 
- 
- // ---------------------- TSD ---------------- {{{1
- 
-+#if SANITIZER_NETBSD
-+// Thread Static Data cannot be used in early init on NetBSD
-+// Reuse the Asan TSD API for compatibility with existing code
-+// with an alternative implementation.
-+
-+static bool tsd_key_inited = false;
-+static void (*tsd_destructor)(void *tsd) = nullptr;
-+static THREADLOCAL void *tsd_key = nullptr;
-+
-+void tsd_at_exit(void *tsd) {
-+  CHECK_EQ(tsd, tsd_key);
-+  CHECK(tsd_key);
-+  (*tsd_destructor)(tsd_key);
-+}
-+
-+void AsanTSDInit(void (*destructor)(void *tsd)) {
-+  CHECK(!tsd_key_inited);
-+  tsd_key_inited = true;
-+  tsd_destructor = destructor;
-+}
-+
-+void *AsanTSDGet() {
-+  CHECK(tsd_key_inited);
-+  return tsd_key;
-+}
-+
-+void AsanTSDSet(void *tsd) {
-+  CHECK(tsd_key_inited);
-+  CHECK(tsd);
-+  CHECK(!tsd_key);
-+  tsd_key = tsd;
-+  if (::__cxa_thread_atexit(tsd_at_exit, tsd, nullptr)) {
-+    Printf("AddressSanitizer: failed to setup thread atexit callback");
-+    Die();
-+  }
-+}
-+
-+void PlatformTSDDtor(void *tsd) {
-+  CHECK(tsd_key_inited);
-+  tsd_key = nullptr;
-+  // Make sure that signal handler can not see a stale current thread pointer.
-+  atomic_signal_fence(memory_order_seq_cst);
-+  AsanThread::TSDDtor(tsd);
-+}
-+#else
- static pthread_key_t tsd_key;
- static bool tsd_key_inited = false;
- void AsanTSDInit(void (*destructor)(void *tsd)) {
-@@ -67,6 +117,7 @@ void PlatformTSDDtor(void *tsd) {
-   }
-   AsanThread::TSDDtor(tsd);
- }
-+#endif
- }  // namespace __asan
- 
- #endif  // SANITIZER_POSIX


Home | Main Index | Thread Index | Old Index