bridges/source/cpp_uno/shared/vtablefactory.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit cca1240fe5884f184af489f5326e96892d1ae975 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Sun Dec 6 16:44:40 2020 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sun Dec 6 18:36:55 2020 +0100 Related tdf#134754: Detect failed mmap on macOS Change-Id: I21202d25e4851725198c58c29d9820bda00f2b30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107315 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> 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, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits