[PATCH] Add FreeBSD support to Asan test cases that use mmap() with MAP_ANON

Viktor Kutuzov vkutuzov at accesssoftek.com
Fri Jul 18 03:36:46 PDT 2014

man mmap on
  Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
     MAP_ANON          Map anonymous memory not associated with any specific
                       file.  The offset argument is ignored.  Mac OS X spe-
                       cific: the file descriptor used for creating MAP_ANON
                       regions can be used to pass some Mach VM flags, and can
                       be specified as -1 if no such flags are associated with
                       the region.  Mach VM flags are defined in <mach/vm_sta-
                       tistics.h> and the ones that currently apply to mmap

So, it looks it actually should be (-1) on Darwin. Will update the patch ASAP.


More information about the llvm-commits mailing list