[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
Fri Jul 20 10:10:47 PDT 2018


delcypher added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_posix_libcdep.cc:338
   if (fd == -1) flags |= MAP_ANON;
+  if (fd == -1 && use_xnu_fast_mmap) fd = kXnuFastMmapFd;
 
----------------
Side note. This implementation will prevent the VM tag being set (see https://reviews.llvm.org/D49603 ) with fast mmap is being used. This needs to be fixed.


================
Comment at: lib/sanitizer_common/sanitizer_posix_libcdep.cc:391
   if (fd == -1) flags |= MAP_ANON;
+  if (fd == -1 && use_xnu_fast_mmap) fd = kXnuFastMmapFd;
 
----------------
delcypher wrote:
> Again can't we move this into the Darwin implementation of `internal_mmap()`. This will also mean we avoid duplicating code.
Side note. This implementation will prevent the VM tag being set (see https://reviews.llvm.org/D49603 ) with fast mmap is being used. This needs to be fixed.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48445





More information about the llvm-commits mailing list