diff options
| author | Kamil Rytarowski <n54@gmx.com> | 2017-12-09 00:27:52 +0000 |
|---|---|---|
| committer | Kamil Rytarowski <n54@gmx.com> | 2017-12-09 00:27:52 +0000 |
| commit | 9ecd4931293dab52772f39225aa3f8f03eb836b7 (patch) | |
| tree | bfb4f669199d6b9f50717fa47f3e705a99289704 | |
| parent | c667c1f47a8ec1acfd6eceb999f8f05793218ca1 (diff) | |
| download | bcm5719-llvm-9ecd4931293dab52772f39225aa3f8f03eb836b7.tar.gz bcm5719-llvm-9ecd4931293dab52772f39225aa3f8f03eb836b7.zip | |
Add NetBSD/x86_64 mapping in MSan
Summary:
Reuse the Linux new mapping as it is.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, vitalybuka, eugenis
Reviewed By: vitalybuka
Subscribers: llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D41023
llvm-svn: 320218
| -rw-r--r-- | compiler-rt/lib/msan/msan.h | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/msan/msan_allocator.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/lib/msan/msan.h b/compiler-rt/lib/msan/msan.h index e58dfe06113..cbae444127e 100644 --- a/compiler-rt/lib/msan/msan.h +++ b/compiler-rt/lib/msan/msan.h @@ -203,7 +203,7 @@ const MappingDesc kMemoryLayout[] = { #define MEM_TO_SHADOW(mem) (LINEARIZE_MEM((mem)) + 0x100000000000ULL) #define SHADOW_TO_ORIGIN(shadow) (((uptr)(shadow)) + 0x280000000000) -#elif SANITIZER_LINUX && SANITIZER_WORDSIZE == 64 +#elif SANITIZER_NETBSD || (SANITIZER_LINUX && SANITIZER_WORDSIZE == 64) #ifdef MSAN_LINUX_X86_64_OLD_MAPPING // Requries PIE binary and ASLR enabled. diff --git a/compiler-rt/lib/msan/msan_allocator.cc b/compiler-rt/lib/msan/msan_allocator.cc index 1b134e15a74..0f994232493 100644 --- a/compiler-rt/lib/msan/msan_allocator.cc +++ b/compiler-rt/lib/msan/msan_allocator.cc @@ -62,7 +62,8 @@ struct MsanMapUnmapCallback { }; typedef SizeClassAllocator32<AP32> PrimaryAllocator; #elif defined(__x86_64__) -#if SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING) +#if SANITIZER_NETBSD || \ + (SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING)) static const uptr kAllocatorSpace = 0x700000000000ULL; #else static const uptr kAllocatorSpace = 0x600000000000ULL; |

