[PATCH] Wrong page protection flags on FreeBSD/PPC

Krzysztof Parzyszek kparzysz at codeaurora.org
Mon Feb 18 07:02:52 PST 2013


The LLVM unit tests (Support) fail on FreeBSD/PPC with a segmentation 
fault.  The problem is in this part:
   if (PFlags & MF_EXEC)
     Memory::InvalidateInstructionCache(Result.Address, Result.Size);

In order to use the instructions in the Invalidate... function, the 
memory needs to be readable.

The proposed fix is to always add PROT_READ to PROT_EXEC on FreeBSD.

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-On-PowerPC-the-cache-flush-instructions-dcbf-and-icb.patch
Type: text/x-patch
Size: 971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130218/c7838ba0/attachment.bin>


More information about the llvm-commits mailing list