[PowerPC] Set PROT_READ flag for MF_EXEC to prevent segfaults on PPC machines
commitad4733ad47b39763733f4f193c3baa823de4e9a4
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 3 Jun 2019 16:20:59 +0000 (3 16:20 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 3 Jun 2019 16:20:59 +0000 (3 16:20 +0000)
tree09705308f2e96a4d533f46c5290197e12f761656
parent1a002c683af0c6f514a5849662ad24eedac6a4f7
[PowerPC] Set PROT_READ flag for MF_EXEC to prevent segfaults on PPC machines

The big endian PPC buildbots are all failing now due to calls to cache
invalidation in unit tests on data that has only the PROT_EXEC flag set.
This has been an issue all along on FreeBSD but it can affect Linux machines
depending on configuration.

This patch mitigates the issue the same way it is mitigated on FreeBSD.

Since this is needed to bring the buildbots back to green, I plan to commit this
and allow for post-commit review, but I thought I would also post it here for
ease of access/readability.

Differential revision: https://reviews.llvm.org/D62741

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362412 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Unix/Memory.inc