pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: update shmctl(2) interception code



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Aug 28 22:13:50 2017 +0200
Changeset:	e5c815d75ef1421f0e1296797aa68364db0eacf3

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_sanitizer__common_sanitizer__platform__limits__netbsd.h
Removed Files:
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc

Log Message:
compiler-rt-netbsd: update shmctl(2) interception code

Apply comments from review.

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

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

diffstat:
 compiler-rt-netbsd/distinfo                        |  5 ++---
 ...zer__common_sanitizer__common__interceptors.inc | 22 ----------------------
 ...__common_sanitizer__platform__limits__netbsd.cc |  4 ++--
 ...r__common_sanitizer__platform__limits__netbsd.h | 14 ++++++++------
 4 files changed, 12 insertions(+), 33 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index f604df8728..57ffdfcf7f 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -22,11 +22,10 @@ SHA1 (patch-lib_fuzzer_afl_afl__driver.cpp) = a114e28152558b7147d0931eb638109c3d
 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__common__interceptors.inc) = db4ed1ac4b21906c23c159e63ce8efe7edbb5afa
 SHA1 (patch-lib_sanitizer__common_sanitizer__linux.h) = 232213b5d65d8a76e9a024bd5dc4103e26321565
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 9ba6676c007713c38b30170872b62d9a4dd45b20
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 98a40050b48f94f6dc2a8bfba05f9fb3e062b216
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 3593763a228846b500d56fdec90c5105b84957c4
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 398d47d5257d30d171baa2b831967cbd0547906c
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = e72ff69d8bcddf7f1c409cd5781b1c6472b03d77
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 64df602cec94311cafcb9e2f2bac69fdf4ee8f65
 SHA1 (patch-lib_sanitizer__common_sanitizer__posix.h) = acbf4de1aebde6ccc5f3c25ad47f09b5bb05fd96
 SHA1 (patch-lib_sanitizer__common_sanitizer__posix__libcdep.cc) = 91bae2714d755ce9c826ed1034189686012d5187
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
deleted file mode 100644
index 0a8264eda3..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2017-08-03 21:24:37.000000000 +0000
-+++ lib/sanitizer_common/sanitizer_common_interceptors.inc
-@@ -4114,6 +4114,9 @@ INTERCEPTOR(int, shmctl, int shmid, int 
-   // https://github.com/google/sanitizers/issues/321.
-   int res = REAL(shmctl)(shmid, cmd, buf);
-   if (res >= 0) {
-+#if SANITIZER_NETBSD
-+    unsigned sz = struct_shminfo_sz;
-+#else
-     unsigned sz = 0;
-     if (cmd == shmctl_ipc_stat || cmd == shmctl_shm_stat)
-       sz = sizeof(__sanitizer_shmid_ds);
-@@ -4121,6 +4124,7 @@ INTERCEPTOR(int, shmctl, int shmid, int 
-       sz = struct_shminfo_sz;
-     else if (cmd == shmctl_shm_info)
-       sz = struct_shm_info_sz;
-+#endif
-     if (sz) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, sz);
-   }
-   return res;
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 6f920d3a40..9cff03f7d1 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,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2017-08-27 06:59:58.497819810 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2017-08-28 18:08:46.850719854 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
 @@ -0,0 +1,359 @@
 +//===-- sanitizer_platform_limits_posix.cc --------------------------------===//
@@ -114,7 +114,7 @@ $NetBSD$
 +uptr sig_dfl = (uptr)SIG_DFL;
 +uptr sa_siginfo = (uptr)SA_SIGINFO;
 +
-+unsigned struct_shminfo_sz = sizeof(struct shminfo);
++int shmctl_ipc_stat = (int)IPC_STAT;
 +
 +unsigned struct_utmp_sz = sizeof(struct utmp);
 +unsigned struct_utmpx_sz = sizeof(struct utmpx);
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
index bdbff91bd7..eb5ea48d4b 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2017-08-28 18:08:46.866135570 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
-@@ -0,0 +1,566 @@
+@@ -0,0 +1,568 @@
 +//===-- sanitizer_platform_limits_posix.h ---------------------------------===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -321,12 +321,14 @@ $NetBSD$
 +typedef void __sanitizer_FILE;
 +#define SANITIZER_HAS_STRUCT_FILE 0
 +
-+extern unsigned struct_shminfo_sz;
-+extern unsigned struct_shm_info_sz;
 +extern int shmctl_ipc_stat;
-+extern int shmctl_ipc_info;
-+extern int shmctl_shm_info;
-+extern int shmctl_shm_stat;
++
++// This simplifies generic code
++#define struct_shminfo_sz -1
++#define struct_shm_info_sz -1
++#define shmctl_shm_stat -1
++#define shmctl_ipc_info -1
++#define shmctl_shm_info -1
 +
 +extern unsigned struct_utmp_sz;
 +extern unsigned struct_utmpx_sz;


Home | Main Index | Thread Index | Old Index