mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-11 14:20:07 +02:00
libffi: Fix allocation of non-executable memory for functions.
Fixes #5109.
This commit is contained in:
@@ -7,7 +7,7 @@ plugins."
|
||||
HOMEPAGE="http://sourceware.org/libffi"
|
||||
COPYRIGHT="1996-2013 Anthony Green, Red Hat, Inc and others."
|
||||
LICENSE="MIT"
|
||||
REVISION="5"
|
||||
REVISION="6"
|
||||
SOURCE_URI="ftp://sourceware.org/pub/libffi/libffi-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"
|
||||
PATCHES="libffi-$portVersion.patchset"
|
||||
|
||||
@@ -20,3 +20,29 @@ index 650ca69..02a1913 100644
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 46ac95d3636b845de417cc97c426b98c89d9ea54 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Lotz <mmlr@mlotz.ch>
|
||||
Date: Fri, 12 Jun 2020 13:14:57 +0000
|
||||
Subject: Mark Haiku as needing PROT_WRITE | PROTO_EXEC for allocations.
|
||||
|
||||
It uses the heap as a fallback, but its areas are marked non-executable
|
||||
in Haiku so function calls into there will segfault with a permission
|
||||
denied error.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index c6da467..d856e1a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -18530,7 +18530,7 @@ case "$target" in
|
||||
$as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
- *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
|
||||
+ *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-*-haiku*)
|
||||
|
||||
$as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
|
||||
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user