llvm-project/llvm/lib/Support/Unix
Peter Smith a939257a42 [ARM][AArch64] Workaround ARM/AArch64 peculiarity in clearing icache.
Certain ARM implementations treat icache clear instruction as a memory read,
and CPU segfaults on trying to clear cache on !PROT_READ page.
We workaround this in Memory::protectMappedMemory by adding
PROT_READ to affected pages, clearing the cache, and then setting
desired protection.

This fixes "AllocationTests/MappedMemoryTest.***/3" unit-tests on
affected hardware.

Reviewers: psmith, zatrazz, kristof.beyls, lhames

Reviewed By: lhames

Subscribers: llvm-commits, krytarowski, peter.smith, jgreenhalgh, aemerson,
             rengolin

Patch by maxim-kuvrykov! 

Differential Revision: https://reviews.llvm.org/D40423

llvm-svn: 319166
2017-11-28 12:34:05 +00:00
..
COM.inc
DynamicLibrary.inc [DynamicLibrary] Fix build on musl libc 2017-10-26 16:44:13 +00:00
Host.inc [Support] sys::getProcessTriple should return a macOS triple using 2017-07-07 09:53:47 +00:00
Memory.inc [ARM][AArch64] Workaround ARM/AArch64 peculiarity in clearing icache. 2017-11-28 12:34:05 +00:00
Mutex.inc
Path.inc [Support/UNIX] posix_fallocate() can fail with EINVAL. 2017-11-07 00:47:04 +00:00
Process.inc Remove Bitrig: LLVM Changes 2017-07-21 22:48:47 +00:00
Program.inc Convenience/safety fix for llvm::sys::Execute(And|No)Wait 2017-09-13 17:03:37 +00:00
README.txt
RWMutex.inc
Signals.inc Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ThreadLocal.inc
Threading.inc Temporary workaround for msan false positive. 2017-11-02 12:29:47 +00:00
Unix.h Remove TimeValue usage from llvm/Support 2016-10-24 10:59:17 +00:00
Watchdog.inc

README.txt

llvm/lib/Support/Unix README
===========================

This directory provides implementations of the lib/System classes that
are common to two or more variants of UNIX. For example, the directory
structure underneath this directory could look like this:

Unix           - only code that is truly generic to all UNIX platforms
  Posix        - code that is specific to Posix variants of UNIX
  SUS          - code that is specific to the Single Unix Specification
  SysV         - code that is specific to System V variants of UNIX

As a rule, only those directories actually needing to be created should be
created. Also, further subdirectories could be created to reflect versions of
the various standards. For example, under SUS there could be v1, v2, and v3
subdirectories to reflect the three major versions of SUS.