Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc | ||
|---|---|---|
| 30 ↗ | (On Diff #11578) | Do the other platforms require it to be 0? Can it just be -1 for all? |
| test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc | ||
|---|---|---|
| 30 ↗ | (On Diff #11578) | I think we should just change it to -1. "man mmap" tells that "The fd and offset arguments are ignored; however, some implementations require fd to be -1 if MAP_ANONYMOUS (or MAP_ANON) is specified, and portable applications should ensure this." |
Comment Actions
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
reads:
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
are:
...So, it looks it actually should be (-1) on Darwin. Will update the patch ASAP.