Commit 8b726534 authored by PHO's avatar PHO Committed by Marge Bot

Fix rts allocateExec() on NetBSD

Similar to SELinux, NetBSD "PaX mprotect" prohibits marking a page
mapping both writable and executable at the same time. Use libffi
which knows how to work around it.
parent 6e2d9ee2
Pipeline #15040 failed with stages
in 587 minutes and 13 seconds
......@@ -1595,11 +1595,12 @@ void flushExec (W_ len, AdjustorExecutable exec_addr)
#endif
}
#if defined(linux_HOST_OS)
#if defined(linux_HOST_OS) || defined(netbsd_HOST_OS)
// On Linux we need to use libffi for allocating executable memory,
// because it knows how to work around the restrictions put in place
// by SELinux.
// by SELinux. The same goes for NetBSD where it is prohibited to
// mark a page mapping both writable and executable at the same time.
AdjustorWritable allocateExec (W_ bytes, AdjustorExecutable *exec_ret)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment