[PATCH] D35629: Add NetBSD support in sanitizer_procmaps.h

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 09:51:56 PDT 2017


krytarowski created this revision.
krytarowski added a project: Sanitizers.
Herald added subscribers: kubamracek, emaste.

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>


Repository:
  rL LLVM

https://reviews.llvm.org/D35629

Files:
  lib/sanitizer_common/sanitizer_procmaps.h


Index: lib/sanitizer_common/sanitizer_procmaps.h
===================================================================
--- lib/sanitizer_common/sanitizer_procmaps.h
+++ lib/sanitizer_common/sanitizer_procmaps.h
@@ -20,16 +20,16 @@
 
 namespace __sanitizer {
 
-#if SANITIZER_FREEBSD || SANITIZER_LINUX
+#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
 struct ProcSelfMapsBuff {
   char *data;
   uptr mmaped_size;
   uptr len;
 };
 
 // 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 @@
 
   // 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_;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35629.107327.patch
Type: text/x-patch
Size: 1023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170719/20b3671d/attachment.bin>


More information about the llvm-commits mailing list