AC_FUNC_MMAP not testing what the comments say

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Prior to 19629fa9fcb209d60012a75ba087a295d4b3c734, AC_FUNC_MMAP malloc'd
some memory and then mmap'd a page in it to test mapping over an entry.
That commit changed the code to use mmap'd memory instead of malloc'd
memory to support cygwin.  Unfortunatly, the code also munmapped the
memory before calling mmap to replace the contents.  This means the code
doesn't test replacing the contents any more and doesn't match the
adjacent comment or the one at the top of the function.

I noticed this problem because we got a report that the test wasn't
working on CheriBSD.  There we close the races between munmap and
a later MAP_FIXED mmap by failing the mmap call and thus the test
fails.  For more details see:

https://github.com/CTSRD-CHERI/cheribsd-ports/issues/122#issuecomment-1858568661

Assuming it works with cygwin, removing the munmap will fix things on
CheriBSD and restore the original behavior which I think is what's
desired here.

-- Brooks




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux