summaryrefslogtreecommitdiff
path: root/os_dep.c
diff options
context:
space:
mode:
Diffstat (limited to 'os_dep.c')
-rw-r--r--os_dep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/os_dep.c b/os_dep.c
index 52391bde..1f6a0b5d 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -2184,7 +2184,11 @@ void GC_register_data_segments(void)
GC_MMAP_FLAGS | OPT_MAP_ANON, zero_fd, 0/* offset */);
# undef IGNORE_PAGES_EXECUTABLE
- if (result == MAP_FAILED) return(0);
+ if (EXPECT(MAP_FAILED == result, FALSE)) {
+ if (HEAP_START == last_addr && GC_pages_executable && EACCES == errno)
+ ABORT("Cannot allocate executable pages");
+ return NULL;
+ }
last_addr = (ptr_t)(((word)result + bytes + GC_page_size - 1)
& ~(GC_page_size - 1));
# if !defined(LINUX)