[PATCH] D48445: [sanitizer] Use "fast mmap" kernel flag for shadow memory on macOS 10.13.4+

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 22 01:44:55 PDT 2018


delcypher accepted this revision.
delcypher added a comment.
This revision is now accepted and ready to land.

Other than the `kXnuFastMmapFd` declaration. LGTM.



================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:120
+// giant memory regions (i.e. shadow memory regions).
+#define kXnuFastMmapFd 0x4
+static bool use_xnu_fast_mmap = false;
----------------
Any particular reason to use a macro rather than `static const int kXnuFastMmapFd = 0x4;`? The later style seems used more in the sanitizer code base (at least the bits I've seen). This is a very minor issue though so I'll leave changing this to your discretion.


https://reviews.llvm.org/D48445





More information about the llvm-commits mailing list