pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Update SVN r. 321993



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Jan 8 16:36:37 2018 +0100
Changeset:	a4806aa1f59ef94b4369fda46a1021656a13c407

Modified Files:
	compiler-rt-netbsd/Makefile
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc

Log Message:
compiler-rt-netbsd: Update SVN r. 321993

This revision contains merged upstream:

Add MSan interceptor for fstat(2) [for NetBSD]
https://reviews.llvm.org/D41637

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

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 +-
 .../patches/patch-lib_msan_msan__interceptors.cc   | 46 +++++-----------------
 3 files changed, 12 insertions(+), 38 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index 38b8b4c2c1..126e31c34c 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=	321288
+SVN_REVISION.compiler-rt=	321993
 
 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 9840803393..17caf8efc8 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -7,7 +7,7 @@ SHA1 (patch-lib_asan_asan__interceptors.cc) = ea4005ce02775060ff52af76d568c45089
 SHA1 (patch-lib_esan_esan__interceptors.cpp) = a7103ca053e92a810c87c593262bb386f3d02606
 SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 38ca750154dfc9843a56748078235824b772a147
 SHA1 (patch-lib_hwasan_hwasan__interceptors.cc) = 45fd48ae7bb21878432f925dea7af8d9f0ee0b02
-SHA1 (patch-lib_msan_msan__interceptors.cc) = 2a08f34b4d41fd46216aa818c379dc6bbb32ae7d
+SHA1 (patch-lib_msan_msan__interceptors.cc) = 77f8abc8dfdc5212b7991fd6e9a724990aa4f8cb
 SHA1 (patch-lib_msan_msan__linux.cc) = d75d7587071a9e7a3f6a08a3008af55319e62cab
 SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = e6f0ecddd946981e9a4b76fd5325f56c2343edcd
 SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 0837dfc7937d93b5811eae751d754006daba26dc
diff --git a/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
index 799a3a067c..7389c228db 100644
--- a/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
@@ -1,21 +1,16 @@
 $NetBSD$
 
---- lib/msan/msan_interceptors.cc.orig	2017-12-21 18:53:10.000000000 +0000
+--- lib/msan/msan_interceptors.cc.orig	2018-01-08 15:33:13.616083625 +0000
 +++ lib/msan/msan_interceptors.cc
-@@ -33,10 +33,12 @@
+@@ -33,6 +33,7 @@
  #include "sanitizer_common/sanitizer_libc.h"
  #include "sanitizer_common/sanitizer_linux.h"
  #include "sanitizer_common/sanitizer_tls_get_addr.h"
 +#include "sanitizer_common/sanitizer_vector.h"
  
  #if SANITIZER_NETBSD
- #define gettimeofday __gettimeofday50
- #define getrusage __getrusage50
-+#define fstat __fstat50
- #endif
- 
- #include <stdarg.h>
-@@ -688,6 +690,86 @@ INTERCEPTOR(int, putenv, char *string) {
+ #define fstat __fstat50
+@@ -689,6 +690,73 @@ INTERCEPTOR(int, putenv, char *string) {
    return res;
  }
  
@@ -86,23 +81,10 @@ $NetBSD$
 +#define MSAN_MAYBE_INTERCEPT_LIBKVM_FUNCTIONS
 +#endif
 +
-+#if SANITIZER_NETBSD
-+INTERCEPTOR(int, fstat, int fd, void *buf) {
-+  ENSURE_MSAN_INITED();
-+  int res = REAL(fstat)(fd, buf);
-+  if (!res)
-+    __msan_unpoison(buf, __sanitizer::struct_stat_sz);
-+  return res;
-+}
-+#define MSAN_MAYBE_INTERCEPT_FSTAT INTERCEPT_FUNCTION(fstat)
-+#else
-+#define MSAN_MAYBE_INTERCEPT_FSTAT
-+#endif
-+
- #if !SANITIZER_FREEBSD && !SANITIZER_NETBSD
- INTERCEPTOR(int, __fxstat, int magic, int fd, void *buf) {
+ #if SANITIZER_NETBSD
+ INTERCEPTOR(int, fstat, int fd, void *buf) {
    ENSURE_MSAN_INITED();
-@@ -1138,23 +1220,78 @@ struct MSanAtExitRecord {
+@@ -1152,23 +1220,78 @@ struct MSanAtExitRecord {
    void *arg;
  };
  
@@ -184,7 +166,7 @@ $NetBSD$
  }
  
  static void BeforeFork() {
-@@ -1387,6 +1524,7 @@ static uptr signal_impl(int signo, uptr 
+@@ -1401,6 +1524,7 @@ static uptr signal_impl(int signo, uptr 
    } while (false)
  #define COMMON_SYSCALL_POST_WRITE_RANGE(p, s) __msan_unpoison(p, s)
  #include "sanitizer_common/sanitizer_common_syscalls.inc"
@@ -192,7 +174,7 @@ $NetBSD$
  
  struct dlinfo {
    char *dli_fname;
-@@ -1552,6 +1690,9 @@ namespace __msan {
+@@ -1566,6 +1690,9 @@ namespace __msan {
  void InitializeInterceptors() {
    static int inited = 0;
    CHECK_EQ(inited, 0);
@@ -202,15 +184,7 @@ $NetBSD$
    InitializeCommonInterceptors();
    InitializeSignalInterceptors();
  
-@@ -1633,6 +1774,7 @@ void InitializeInterceptors() {
-   INTERCEPT_FUNCTION(putenv);
-   INTERCEPT_FUNCTION(gettimeofday);
-   MSAN_MAYBE_INTERCEPT_FCVT;
-+  MSAN_MAYBE_INTERCEPT_FSTAT;
-   MSAN_MAYBE_INTERCEPT___FXSTAT;
-   MSAN_INTERCEPT_FSTATAT;
-   MSAN_MAYBE_INTERCEPT___FXSTAT64;
-@@ -1667,6 +1809,7 @@ void InitializeInterceptors() {
+@@ -1682,6 +1809,7 @@ void InitializeInterceptors() {
  
    INTERCEPT_FUNCTION(pthread_join);
    INTERCEPT_FUNCTION(tzset);


Home | Main Index | Thread Index | Old Index