Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions opal/mca/memory/patcher/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ AC_DEFUN([MCA_opal_memory_patcher_CONFIG],[
esac
AC_MSG_RESULT([$opal_memory_patcher_happy])

# syscall interface causes compiler warnings.
# Per the above logic, memory patcher no longer supports MacOS/Darwin,
# so we no longer support Darwin-specific logic for intercept_mmap.
# See issue #6853: mmap infinite recurse in opal/mca/memory/patcher
AS_IF([test "$opal_memory_patcher_happy" == "yes"], [
AC_CHECK_FUNCS([__curbrk])
AC_CHECK_HEADERS([linux/mman.h sys/syscall.h])
AC_CHECK_DECLS([__mmap], [], [], [#include <sys/mman.h>])
AC_CHECK_FUNCS([__mmap])
AC_CHECK_DECLS([__syscall], [], [], [#include <sys/syscall.h>])
AC_CHECK_FUNCS([__syscall])
AC_CHECK_HEADERS([linux/mman.h sys/syscall.h])
AC_CHECK_DECLS([__syscall], [], [], [#include <sys/syscall.h>])
AC_CHECK_FUNCS([__syscall])
$1], [$2])

AC_CONFIG_FILES([opal/mca/memory/patcher/Makefile])
Expand Down
5 changes: 0 additions & 5 deletions opal/mca/memory/patcher/memory_patcher_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,7 @@ static void *_intercept_mmap(void *start, size_t length, int prot, int flags, in
}

if (!original_mmap) {
#ifdef HAVE___MMAP
/* the darwin syscall returns an int not a long so call the underlying __mmap function */
result = __mmap (start, length, prot, flags, fd, offset);
#else
result = (void*)(intptr_t) memory_patcher_syscall(SYS_mmap, start, length, prot, flags, fd, offset);
#endif
} else {
result = original_mmap (start, length, prot, flags, fd, offset);
}
Expand Down