pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Disable background thread on NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Oct 16 19:50:47 2017 +0200
Changeset:	1176b1509017bea7d5ec5b5dd11e6a4c98ed38a2

Modified Files:
	compiler-rt-netbsd/distinfo
Added Files:
	compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc

Log Message:
compiler-rt-netbsd: Disable background thread on NetBSD

This thread does g/c of shadow memory and writes heap profile
periodically. It's not required for operation for real programs now.

It breaks because it attempts to create new POSIX thread before
initialization of libc and libpthread startup code.

Once tsan will pass all tests on NetBSD, this can be implemented differently
to support the NetBSD case defering startup of this thread later.

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=1176b1509017bea7d5ec5b5dd11e6a4c98ed38a2

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

diffstat:
 compiler-rt-netbsd/distinfo                                |  1 +
 compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 31829c6057..c424d23426 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -7,6 +7,7 @@ SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = 25cba9ff9d61910bb74d500
 SHA1 (patch-lib_tsan_go_buildgo.sh) = fe64b3389bbf6ae2ddf187df3e0600b2f817f51d
 SHA1 (patch-lib_tsan_rtl_tsan__platform__linux.cc) = 23744bd656f0dcee425821491bcaa723f26130a3
 SHA1 (patch-lib_tsan_rtl_tsan__platform__posix.cc) = ddf48d91100e681f09b7303a37936ac8cd7f775a
+SHA1 (patch-lib_tsan_rtl_tsan__rtl.cc) = f21a7acad2b84c1a32d83ddad336369b016a4990
 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_tsan_rtl_tsan__rtl.cc b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc
new file mode 100644
index 0000000000..3ec8ab03b6
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- lib/tsan/rtl/tsan_rtl.cc.orig	2017-07-24 13:39:38.000000000 +0000
++++ lib/tsan/rtl/tsan_rtl.cc
+@@ -371,7 +371,7 @@ void Initialize(ThreadState *thr) {
+   // On MIPS, TSan initialization is run before
+   // __pthread_initialize_minimal_internal() is finished, so we can not spawn
+   // new threads.
+-#ifndef __mips__
++#if !defined(__mips__) && !SANITIZER_NETBSD /* XXX: fix it in future, not crucial now */
+   StartBackgroundThread();
+   SetSandboxingCallback(StopBackgroundThread);
+ #endif


Home | Main Index | Thread Index | Old Index