[PATCH] D35558: Use sys::Memory::AllocateRWX for JIT code

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 05:58:25 PDT 2017


krytarowski created this revision.

NetBSD ships with PaX MPROTECT (known as W^X).

This means that if a memory page was writable, it cannot be switched to executable.
Allocating such pages requires extended interface that is handled inside AllocateRWX.

This fixes circa 200 unexpected failures in LLVM tests ("check-llvm") on NetBSD 8.0(beta).
All JIT, ExecutionEngine and similar failures are resolved.

Sponsored by <The NetBSD Foundation>


Repository:
  rL LLVM

https://reviews.llvm.org/D35558

Files:
  include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
  include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
  lib/ExecutionEngine/Orc/OrcABISupport.cpp
  lib/ExecutionEngine/SectionMemoryManager.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35558.107083.patch
Type: text/x-patch
Size: 8750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170718/dc90acf4/attachment.bin>


More information about the llvm-commits mailing list