diff options
-rw-r--r-- | bridges/source/cpp_uno/shared/vtablefactory.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx index 52309c6ec617..73dc42ef6dfc 100644 --- a/bridges/source/cpp_uno/shared/vtablefactory.cxx +++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx @@ -85,6 +85,11 @@ extern "C" void * allocExec( p = mmap( nullptr, n, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON | MAP_JIT, -1, 0); + if (p == MAP_FAILED) { + auto const e = errno; + SAL_WARN("bridges.osx", "mmap failed with " << e << ", " << strerror(e)); + p = nullptr; + } #else p = mmap( nullptr, n, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, |