Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boehm_gc: fix mmap(PROT_NONE) failed (#4820)
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From bbc09e8c410f0e2ff3e0b0c93884e87b5a75c15f Mon Sep 17 00:00:00 2001 | ||
From: Massimiliano Gubinelli <m.gubinelli@gmail.com> | ||
Date: Mon, 23 Mar 2020 16:36:01 +0000 | ||
Subject: fix for "mmap(PROT_NONE) failed" in compiling GNU Guile 2.2.7 | ||
|
||
|
||
diff --git a/os_dep.c b/os_dep.c | ||
index f0c3eae..03fb984 100644 | ||
--- a/os_dep.c | ||
+++ b/os_dep.c | ||
@@ -2560,7 +2560,7 @@ GC_INNER void GC_unmap(ptr_t start, size_t bytes) | ||
/* We immediately remap it to prevent an intervening mmap from */ | ||
/* accidentally grabbing the same address space. */ | ||
{ | ||
-# ifdef CYGWIN32 | ||
+# if defined(CYGWIN32) || defined(__HAIKU__) | ||
/* Calling mmap() with the new protection flags on an */ | ||
/* existing memory map with MAP_FIXED is broken on Cygwin. */ | ||
/* However, calling mprotect() on the given address range */ | ||
-- | ||
2.24.1 | ||
|
4851829
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diversys Could it be something to fix in Haiku itself?
4851829
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, could be. Should we revert this fix?
4851829
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a problem similar to https://dev.haiku-os.org/ticket/15804.
4851829
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, for beta1, this is fine. mmap(PROT_NONE) usually means overcommit, there are a few usecases (for instance openjdk) where this would be interesting.