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

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 13:04:00 PDT 2018


eugenis added a comment.

I don't like the new Mmap*Shadow functions. The number of different Mmap* functions is growing exponentially with any new feature, let's use flags and/or arguments instead.

It is also not clear from the user side what this Shadow suffix means exactly. If that's an optimization for huge mappings, can't we define a size threshold when it is more efficient than the alternative, and use it under the hood in common Mmap* calls?



================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:113
                    int fd, u64 offset) {
+  Report("internal_mmap(%p,%p)\n", addr, length);
   if (fd == -1) fd = VM_MAKE_TAG(VM_MEMORY_SANITIZER);
----------------
Leftover debug? More of the same below.


https://reviews.llvm.org/D48445





More information about the llvm-commits mailing list