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



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Nov 28 18:40:52 2017 +0100
Changeset:	ff41ad750a9a3dbdc161b08541b1844bed77b96f

Modified Files:
	compiler-rt-netbsd/Makefile
	compiler-rt-netbsd/distinfo
Removed Files:
	compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc
	compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl__amd64.S

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

This contains a NetBSD patch merged upstream:

Support the setjmp(3) family of functions in TSan/NetBSD
https://reviews.llvm.org/D40337

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=ff41ad750a9a3dbdc161b08541b1844bed77b96f

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                        |   2 -
 .../patch-lib_tsan_rtl_tsan__interceptors.cc       | 116 ------------------
 .../patches/patch-lib_tsan_rtl_tsan__rtl__amd64.S  | 132 ---------------------
 4 files changed, 1 insertion(+), 251 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index cca385b1f6..c617fb8156 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=	319163
+SVN_REVISION.compiler-rt=	319189
 
 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 9b30c42710..45eba8fe56 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -4,8 +4,6 @@ SHA1 (patch-cmake_config-ix.cmake) = b22fbae114557b1fb99e0683bd0a8804bdadcda5
 SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 38ca750154dfc9843a56748078235824b772a147
 SHA1 (patch-lib_msan_msan.h) = 1ee0f86ccb410561d381afba526c85aa5dace912
 SHA1 (patch-lib_scudo_scudo__platform.h) = 5dfd8f903c840e9ba81f2a8e502a380d296d4d5a
-SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = 3ae41067c820a01caaa1e8764ea2536e8e1e6c52
 SHA1 (patch-lib_tsan_rtl_tsan__rtl.cc) = a2485075212f150ee2ce33616e887be2b3f41822
-SHA1 (patch-lib_tsan_rtl_tsan__rtl__amd64.S) = 5a0bed4cf2c1f63affeed8886983a53b4376ab5b
 SHA1 (patch-test_lsan_lit.common.cfg) = 10dc251f80efb96d015a22c740dc20b1843b9a11
 SHA1 (patch-test_scudo_lit.cfg) = 5821288b2a385d0da45a9af25f16a92b1316f962
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
deleted file mode 100644
index 4f188f9ea3..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-$NetBSD$
-
---- lib/tsan/rtl/tsan_interceptors.cc.orig	2017-11-28 14:09:06.655354421 +0000
-+++ lib/tsan/rtl/tsan_interceptors.cc
-@@ -550,7 +550,37 @@ extern "C" void __tsan_setjmp(uptr sp, u
-   SetJmp(cur_thread(), sp, mangled_sp);
- }
- 
--#if SANITIZER_MAC
-+#if SANITIZER_NETBSD
-+// Not called.  Merely to satisfy TSAN_INTERCEPT().
-+extern "C" SANITIZER_INTERFACE_ATTRIBUTE
-+int __interceptor___setjmp14(void *env);
-+extern "C" int __interceptor___setjmp14(void *env) {
-+  CHECK(0);
-+  return 0;
-+}
-+
-+// FIXME: any reason to have a separate declaration?
-+extern "C" SANITIZER_INTERFACE_ATTRIBUTE
-+int __interceptor___sigsetjmp14(void *env, int val);
-+extern "C" int __interceptor___sigsetjmp14(void *env, int val) {
-+  CHECK(0);
-+  return 0;
-+}
-+
-+extern "C" SANITIZER_INTERFACE_ATTRIBUTE
-+int __interceptor_setjmp(void *env);
-+extern "C" int __interceptor_setjmp(void *env) {
-+  CHECK(0);
-+  return 0;
-+}
-+
-+extern "C" int __setjmp14(void *env);
-+extern "C" int __sigsetjmp14(void *env, int val);
-+extern "C" int _setjmp(void *env);
-+DEFINE_REAL(int, __setjmp14, void *env)
-+DEFINE_REAL(int, __sigsetjmp14, void *env, int val)
-+DEFINE_REAL(int, _setjmp, void *env)
-+#elif SANITIZER_MAC
- TSAN_INTERCEPTOR(int, setjmp, void *env);
- TSAN_INTERCEPTOR(int, _setjmp, void *env);
- TSAN_INTERCEPTOR(int, sigsetjmp, void *env);
-@@ -595,6 +625,38 @@ DEFINE_REAL(int, sigsetjmp, void *env)
- DEFINE_REAL(int, __sigsetjmp, void *env)
- #endif  // SANITIZER_MAC
- 
-+#if SANITIZER_NETBSD
-+TSAN_INTERCEPTOR(void, __longjmp14, uptr *env, int val) {
-+  // Note: if we call REAL(longjmp) in the context of ScopedInterceptor,
-+  // bad things will happen. We will jump over ScopedInterceptor dtor and can
-+  // leave thr->in_ignored_lib set.
-+  {
-+    SCOPED_INTERCEPTOR_RAW(__longjmp14, env, val);
-+  }
-+  LongJmp(cur_thread(), env);
-+  REAL(__longjmp14)(env, val);
-+}
-+
-+TSAN_INTERCEPTOR(void, __siglongjmp14, uptr *env, int val) {
-+  {
-+    SCOPED_INTERCEPTOR_RAW(__siglongjmp14, env, val);
-+  }
-+  LongJmp(cur_thread(), env);
-+  REAL(__siglongjmp14)(env, val);
-+}
-+
-+TSAN_INTERCEPTOR(void, _longjmp, uptr *env, int val) {
-+  // Note: if we call REAL(longjmp) in the context of ScopedInterceptor,
-+  // bad things will happen. We will jump over ScopedInterceptor dtor and can
-+  // leave thr->in_ignored_lib set.
-+  {
-+    SCOPED_INTERCEPTOR_RAW(_longjmp, env, val);
-+  }
-+  LongJmp(cur_thread(), env);
-+  REAL(_longjmp)(env, val);
-+}
-+#else
-+
- TSAN_INTERCEPTOR(void, longjmp, uptr *env, int val) {
-   // Note: if we call REAL(longjmp) in the context of ScopedInterceptor,
-   // bad things will happen. We will jump over ScopedInterceptor dtor and can
-@@ -613,6 +675,7 @@ TSAN_INTERCEPTOR(void, siglongjmp, uptr 
-   LongJmp(cur_thread(), env);
-   REAL(siglongjmp)(env, val);
- }
-+#endif
- 
- #if !SANITIZER_MAC
- TSAN_INTERCEPTOR(void*, malloc, uptr size) {
-@@ -2547,6 +2610,17 @@ void InitializeInterceptors() {
-   InitializeCommonInterceptors();
-   InitializeSignalInterceptors();
- 
-+#if SANITIZER_NETBSD
-+  using __interception::GetRealFunctionAddress;
-+  GetRealFunctionAddress("__setjmp14", (uptr*)&REAL(__setjmp14), 0, 0);
-+  GetRealFunctionAddress("__sigsetjmp14", (uptr*)&REAL(__sigsetjmp14), 0, 0);
-+  GetRealFunctionAddress("_setjmp", (uptr*)&REAL(_setjmp), 0, 0);
-+
-+  TSAN_INTERCEPT(__longjmp14);
-+  TSAN_INTERCEPT(__siglongjmp14);
-+  TSAN_INTERCEPT(_longjmp);
-+#else
-+
- #if !SANITIZER_MAC
-   // We can not use TSAN_INTERCEPT to get setjmp addr,
-   // because it does &setjmp and setjmp is not present in some versions of libc.
-@@ -2559,6 +2633,7 @@ void InitializeInterceptors() {
- 
-   TSAN_INTERCEPT(longjmp);
-   TSAN_INTERCEPT(siglongjmp);
-+#endif
- 
-   TSAN_INTERCEPT(malloc);
-   TSAN_INTERCEPT(__libc_memalign);
diff --git a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl__amd64.S b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl__amd64.S
deleted file mode 100644
index c6a98d80dd..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl__amd64.S
+++ /dev/null
@@ -1,132 +0,0 @@
-$NetBSD$
-
---- lib/tsan/rtl/tsan_rtl_amd64.S.orig	2017-10-17 18:35:43.000000000 +0000
-+++ lib/tsan/rtl/tsan_rtl_amd64.S
-@@ -170,19 +170,27 @@ ASM_TSAN_SYMBOL(__tsan_report_race_thunk
-   CFI_ENDPROC
- 
- ASM_HIDDEN(__tsan_setjmp)
--#if !defined(__APPLE__)
-+#if defined(__NetBSD__)
-+.comm _ZN14__interception15real___setjmp14E,8,8
-+#elif !defined(__APPLE__)
- .comm _ZN14__interception11real_setjmpE,8,8
- #endif
-+#if defined(__NetBSD__)
-+.globl ASM_TSAN_SYMBOL_INTERCEPTOR(__setjmp14)
-+ASM_TYPE_FUNCTION(ASM_TSAN_SYMBOL_INTERCEPTOR(__setjmp14))
-+ASM_TSAN_SYMBOL_INTERCEPTOR(__setjmp14):
-+#else
- .globl ASM_TSAN_SYMBOL_INTERCEPTOR(setjmp)
- ASM_TYPE_FUNCTION(ASM_TSAN_SYMBOL_INTERCEPTOR(setjmp))
- ASM_TSAN_SYMBOL_INTERCEPTOR(setjmp):
-+#endif
-   CFI_STARTPROC
-   // save env parameter
-   push %rdi
-   CFI_ADJUST_CFA_OFFSET(8)
-   CFI_REL_OFFSET(%rdi, 0)
-   // obtain %rsp
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
-   lea 8(%rsp), %rdi
-   mov %rdi, %rsi
- #elif defined(__APPLE__)
-@@ -204,14 +212,21 @@ ASM_TSAN_SYMBOL_INTERCEPTOR(setjmp):
-   CFI_RESTORE(%rdi)
-   // tail jump to libc setjmp
-   movl $0, %eax
--#if !defined(__APPLE__)
-+#if defined(__NetBSD__)
-+  movq _ZN14__interception15real___setjmp14E@GOTPCREL(%rip), %rdx
-+  jmp *(%rdx)
-+#elif !defined(__APPLE__)
-   movq _ZN14__interception11real_setjmpE@GOTPCREL(%rip), %rdx
-   jmp *(%rdx)
- #else
-   jmp ASM_TSAN_SYMBOL(setjmp)
- #endif
-   CFI_ENDPROC
-+#if defined(__NetBSD__)
-+ASM_SIZE(ASM_TSAN_SYMBOL_INTERCEPTOR(__setjmp14))
-+#else
- ASM_SIZE(ASM_TSAN_SYMBOL_INTERCEPTOR(setjmp))
-+#endif
- 
- .comm _ZN14__interception12real__setjmpE,8,8
- .globl ASM_TSAN_SYMBOL_INTERCEPTOR(_setjmp)
-@@ -223,7 +238,7 @@ ASM_TSAN_SYMBOL_INTERCEPTOR(_setjmp):
-   CFI_ADJUST_CFA_OFFSET(8)
-   CFI_REL_OFFSET(%rdi, 0)
-   // obtain %rsp
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
-   lea 8(%rsp), %rdi
-   mov %rdi, %rsi
- #elif defined(__APPLE__)
-@@ -254,10 +269,17 @@ ASM_TSAN_SYMBOL_INTERCEPTOR(_setjmp):
-   CFI_ENDPROC
- ASM_SIZE(ASM_TSAN_SYMBOL_INTERCEPTOR(_setjmp))
- 
-+#if defined(__NetBSD__)
-+.comm _ZN14__interception18real___sigsetjmp14E,8,8
-+.globl ASM_TSAN_SYMBOL_INTERCEPTOR(__sigsetjmp14)
-+ASM_TYPE_FUNCTION(ASM_TSAN_SYMBOL_INTERCEPTOR(__sigsetjmp14))
-+ASM_TSAN_SYMBOL_INTERCEPTOR(__sigsetjmp14):
-+#else
- .comm _ZN14__interception14real_sigsetjmpE,8,8
- .globl ASM_TSAN_SYMBOL_INTERCEPTOR(sigsetjmp)
- ASM_TYPE_FUNCTION(ASM_TSAN_SYMBOL_INTERCEPTOR(sigsetjmp))
- ASM_TSAN_SYMBOL_INTERCEPTOR(sigsetjmp):
-+#endif
-   CFI_STARTPROC
-   // save env parameter
-   push %rdi
-@@ -271,7 +293,7 @@ ASM_TSAN_SYMBOL_INTERCEPTOR(sigsetjmp):
-   sub $8, %rsp
-   CFI_ADJUST_CFA_OFFSET(8)
-   // obtain %rsp
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
-   lea 24(%rsp), %rdi
-   mov %rdi, %rsi
- #elif defined(__APPLE__)
-@@ -300,16 +322,23 @@ ASM_TSAN_SYMBOL_INTERCEPTOR(sigsetjmp):
-   CFI_RESTORE(%rdi)
-   // tail jump to libc sigsetjmp
-   movl $0, %eax
--#if !defined(__APPLE__)
-+#if defined(__NetBSD__)
-+  movq _ZN14__interception18real___sigsetjmp14E@GOTPCREL(%rip), %rdx
-+  jmp *(%rdx)
-+#elif !defined(__APPLE__)
-   movq _ZN14__interception14real_sigsetjmpE@GOTPCREL(%rip), %rdx
-   jmp *(%rdx)
- #else
-   jmp ASM_TSAN_SYMBOL(sigsetjmp)
- #endif
-   CFI_ENDPROC
-+#if defined(__NetBSD__)
-+ASM_SIZE(ASM_TSAN_SYMBOL_INTERCEPTOR(__sigsetjmp14))
-+#else
- ASM_SIZE(ASM_TSAN_SYMBOL_INTERCEPTOR(sigsetjmp))
-+#endif
- 
--#if !defined(__APPLE__)
-+#if !defined(__APPLE__) && !defined(__NetBSD__)
- .comm _ZN14__interception16real___sigsetjmpE,8,8
- .globl ASM_TSAN_SYMBOL_INTERCEPTOR(__sigsetjmp)
- ASM_TYPE_FUNCTION(ASM_TSAN_SYMBOL_INTERCEPTOR(__sigsetjmp))
-@@ -355,10 +384,11 @@ ASM_TSAN_SYMBOL_INTERCEPTOR(__sigsetjmp)
-   jmp *(%rdx)
-   CFI_ENDPROC
- ASM_SIZE(ASM_TSAN_SYMBOL_INTERCEPTOR(__sigsetjmp))
--#endif  // !defined(__APPLE__)
-+#endif  // !defined(__APPLE__) && !defined(__NetBSD__)
- 
- #if defined(__FreeBSD__) || defined(__linux__)
- /* We do not need executable stack.  */
-+/* This note is not needed on NetBSD. */
- .section        .note.GNU-stack,"",@progbits
- #endif
- 


Home | Main Index | Thread Index | Old Index