diff options
Diffstat (limited to 'os_dep.c')
-rw-r--r-- | os_dep.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |