Skip to content
Closed
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
9 changes: 7 additions & 2 deletions opal/mca/memory/patcher/memory_patcher_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,13 @@ static void *_intercept_mmap(void *start, size_t length, int prot, int flags, in
}

if (!original_mmap) {
result = (void *) (intptr_t) memory_patcher_syscall(SYS_mmap, start, length, prot, flags,
fd, offset);
/* On RHEL8.1 (glibc-2.28-72.el8.ppc64le) __mmap became a global 'T' symbol, yet was the same address as mmap. Don't recall it! */
if (__mmap != 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);
}
} else {
result = original_mmap(start, length, prot, flags, fd, offset);
}
Expand Down