[compiler-rt] r308615 - Add NetBSD support in sanitizer_procmaps.h
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 06:31:06 PDT 2017
Author: kamil
Date: Thu Jul 20 06:31:06 2017
New Revision: 308615
URL: http://llvm.org/viewvc/llvm-project?rev=308615&view=rev
Log:
Add NetBSD support in sanitizer_procmaps.h
Summary:
Reuse Linux and FreeBSD - no NetBSD specific changes.
Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, filcab, kcc, vitalybuka
Reviewed By: filcab
Subscribers: llvm-commits, emaste, kubamracek, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D35629
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h?rev=308615&r1=308614&r2=308615&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps.h Thu Jul 20 06:31:06 2017
@@ -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
// Memory protection masks.
static const uptr kProtectionRead = 1;
@@ -76,7 +76,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_;
More information about the llvm-commits
mailing list