pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Fix build of sanitizer_procmaps_netbsd.cc



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Jun 14 01:49:23 2017 +0200
Changeset:	4501bfac093e849e02434529d2535cae39595efb

Modified Files:
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc
Added Files:
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps.h

Log Message:
compiler-rt-netbsd: Fix build of sanitizer_procmaps_netbsd.cc

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=4501bfac093e849e02434529d2535cae39595efb

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

diffstat:
 compiler-rt-netbsd/distinfo                        |  3 ++-
 ...tch-lib_sanitizer__common_sanitizer__procmaps.h | 31 ++++++++++++++++++++++
 ...anitizer__common_sanitizer__procmaps__netbsd.cc | 11 ++++----
 3 files changed, 39 insertions(+), 6 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index d864d64c18..bc57882047 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -18,7 +18,8 @@ SHA1 (patch-lib_builtins_gcc__personality__v0.c) = 0a48656e68614730ea05e8fb25884
 SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = 45b18179c5d1d9f284ccfe4670a989ac30d05e92
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform.h) = 47360a8352cc34fddc71c8f71081d7d589a63dad
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = dbbd4ac2b1356fe37b8b63c88c1dbf7bce403d86
-SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc) = 0b8d88529f7374a1159c65c0bccd946ccf6a65f3
+SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps.h) = ec0b5c576463639a3ee66c33ff7e9d94076f40df
+SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc) = 965b6d98cd4499649df98d77dbe327c0003c5aab
 SHA1 (patch-test_asan_lit.cfg) = 259b0e262b5975b862a51f015ec6b646ce2af10a
 SHA1 (patch-test_sanitizer__common_CMakeLists.txt) = 6af4c5ca42f17bb09823c36bf32d5576fbc0b4c8
 SHA1 (patch-test_ubsan_lit.common.cfg) = d60d738aaf8525cf3f5f028dc2fc2fe54a7d691b
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps.h
new file mode 100644
index 0000000000..f9fe12c807
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- lib/sanitizer_common/sanitizer_procmaps.h.orig	2017-06-03 23:53:58.000000000 +0000
++++ lib/sanitizer_common/sanitizer_procmaps.h
+@@ -20,7 +20,7 @@
+ 
+ namespace __sanitizer {
+ 
+-#if SANITIZER_FREEBSD || SANITIZER_LINUX
++#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
+ struct ProcSelfMapsBuff {
+   char *data;
+   uptr mmaped_size;
+@@ -29,7 +29,7 @@ struct ProcSelfMapsBuff {
+ 
+ // Reads process memory map in an OS-specific way.
+ void ReadProcMaps(ProcSelfMapsBuff *proc_maps);
+-#endif  // SANITIZER_FREEBSD || SANITIZER_LINUX
++#endif  // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
+ 
+ class MemoryMappingLayout {
+  public:
+@@ -58,7 +58,7 @@ class MemoryMappingLayout {
+ 
+   // FIXME: Hide implementation details for different platforms in
+   // platform-specific files.
+-# if SANITIZER_FREEBSD || SANITIZER_LINUX
++# if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
+   ProcSelfMapsBuff proc_self_maps_;
+   const char *current_;
+ 
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc
index cab83cdcba..79dc97a0a2 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_procmaps_netbsd.cc.orig	2017-06-04 10:44:01.380040884 +0000
+--- lib/sanitizer_common/sanitizer_procmaps_netbsd.cc.orig	2017-06-13 19:04:08.673975123 +0000
 +++ lib/sanitizer_common/sanitizer_procmaps_netbsd.cc
-@@ -0,0 +1,78 @@
+@@ -0,0 +1,79 @@
 +//===-- sanitizer_procmaps_freebsd.cc -------------------------------------===//
 +//
 +// This file is distributed under the University of Illinois Open Source
@@ -10,7 +10,7 @@ $NetBSD$
 +//
 +//===----------------------------------------------------------------------===//
 +//
-+// Information about the process mappings (FreeBSD-specific parts).
++// Information about the process mappings (NetBSD-specific parts).
 +//===----------------------------------------------------------------------===//
 +
 +#include "sanitizer_platform.h"
@@ -20,7 +20,6 @@ $NetBSD$
 +
 +#include <unistd.h>
 +#include <sys/sysctl.h>
-+#include <sys/user.h>
 +
 +namespace __sanitizer {
 +
@@ -45,7 +44,9 @@ $NetBSD$
 +
 +bool MemoryMappingLayout::Next(uptr *start, uptr *end, uptr *offset,
 +                               char filename[], uptr filename_size,
-+                               uptr *protection) {
++                               uptr *protection, ModuleArch *arch, u8 *uuid) {
++  CHECK(!arch && "not implemented");
++  CHECK(!uuid && "not implemented");
 +  char *last = proc_self_maps_.data + proc_self_maps_.len;
 +  if (current_ >= last) return false;
 +  uptr dummy;


Home | Main Index | Thread Index | Old Index