pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Include patch for ASAN memory mapping



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Aug 19 19:42:10 2017 +0200
Changeset:	4807dc2acc24df57a6d2671f4d09d7e51e3f05b0

Modified Files:
	compiler-rt-netbsd/distinfo
Added Files:
	compiler-rt-netbsd/patches/patch-lib_asan_asan__mapping.h

Log Message:
compiler-rt-netbsd: Include patch for ASAN memory mapping

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=4807dc2acc24df57a6d2671f4d09d7e51e3f05b0

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 +
 .../patches/patch-lib_asan_asan__mapping.h         | 37 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index db8ba607bd..3cecd0929f 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -12,5 +12,6 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
 SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
 RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
 Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
+SHA1 (patch-lib_asan_asan__mapping.h) = 73f5f33e946868b4780864e633916376b11b16f1
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = 36a89517584891a1a50536a681a5d42e99ef904d
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 89302e7b40901faaa471cdd76eefa222a0cc055d
diff --git a/compiler-rt-netbsd/patches/patch-lib_asan_asan__mapping.h b/compiler-rt-netbsd/patches/patch-lib_asan_asan__mapping.h
new file mode 100644
index 0000000000..0d32f9db69
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_asan_asan__mapping.h
@@ -0,0 +1,37 @@
+$NetBSD$
+
+--- lib/asan/asan_mapping.h.orig	2017-07-03 15:33:06.000000000 +0000
++++ lib/asan/asan_mapping.h
+@@ -115,6 +115,13 @@
+ // || `[0x40000000, 0x47ffffff]` || LowShadow  ||
+ // || `[0x00000000, 0x3fffffff]` || LowMem     ||
+ //
++// Shadow mapping on NetBSD/x86-64 with SHADOW_OFFSET == 0x400000000000:
++// || `[0x4feffffffe01, 0x7f7ffffff000]` || HighMem    ||
++// || `[0x49fdffffffc0, 0x4feffffffe00]` || HighShadow ||
++// || `[0x480000000000, 0x49fdffffffbf]` || ShadowGap  ||
++// || `[0x400000000000, 0x47ffffffffff]` || LowShadow  ||
++// || `[0x000000000000, 0x3fffffffffff]` || LowMem     ||
++//
+ // Default Windows/i386 mapping:
+ // (the exact location of HighShadow/HighMem may vary depending
+ //  on WoW64, /LARGEADDRESSAWARE, etc).
+@@ -140,6 +147,7 @@ static const u64 kPPC64_ShadowOffset64 =
+ static const u64 kSystemZ_ShadowOffset64 = 1ULL << 52;
+ static const u64 kFreeBSD_ShadowOffset32 = 1ULL << 30;  // 0x40000000
+ static const u64 kFreeBSD_ShadowOffset64 = 1ULL << 46;  // 0x400000000000
++static const u64 kNetBSD_ShadowOffset64 = 1ULL << 46;  // 0x400000000000
+ static const u64 kWindowsShadowOffset32 = 3ULL << 28;  // 0x30000000
+ 
+ #define SHADOW_SCALE kDefaultShadowScale
+@@ -176,8 +184,8 @@ static const u64 kWindowsShadowOffset32 
+ #    define SHADOW_OFFSET kPPC64_ShadowOffset64
+ #  elif defined(__s390x__)
+ #    define SHADOW_OFFSET kSystemZ_ShadowOffset64
+-#  elif SANITIZER_FREEBSD
+-#    define SHADOW_OFFSET kFreeBSD_ShadowOffset64
++#  elif SANITIZER_NETBSD
++#    define SHADOW_OFFSET kNetBSD_ShadowOffset64
+ #  elif SANITIZER_MAC
+ #   define SHADOW_OFFSET kDefaultShadowOffset64
+ #  elif defined(__mips64)


Home | Main Index | Thread Index | Old Index