1
1

memory/patcher: do not hook madvise

It is not possible to hook madvise at this time due to a deadlock when
using glibc.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
Nathan Hjelm 2017-03-07 16:26:53 -07:00
родитель 7240bee0e0
Коммит 3caeda21dc

Просмотреть файл

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights * Copyright (c) 2013-2017 Los Alamos National Security, LLC. All rights
* reserved. * reserved.
* Copyright (c) 2016 Research Organization for Information Science * Copyright (c) 2016 Research Organization for Information Science
* and Technology (RIST). All rights reserved. * and Technology (RIST). All rights reserved.
@ -496,12 +496,16 @@ static int patcher_open (void)
} }
#endif #endif
/* NTH: we can't currently allow madvise to be intercepted due to a deadlock when running with glibc. in
* the future we may re-enable this hook if the deadlock can be resolved. */
#if 0
#if defined (SYS_madvise) #if defined (SYS_madvise)
rc = opal_patcher->patch_symbol ("madvise", (uintptr_t)intercept_madvise, (uintptr_t *) &original_madvise); rc = opal_patcher->patch_symbol ("madvise", (uintptr_t)intercept_madvise, (uintptr_t *) &original_madvise);
if (OPAL_SUCCESS != rc) { if (OPAL_SUCCESS != rc) {
return rc; return rc;
} }
#endif #endif
#endif
#if defined(SYS_shmdt) && defined(__linux__) #if defined(SYS_shmdt) && defined(__linux__)
rc = opal_patcher->patch_symbol ("shmdt", (uintptr_t) intercept_shmdt, (uintptr_t *) &original_shmdt); rc = opal_patcher->patch_symbol ("shmdt", (uintptr_t) intercept_shmdt, (uintptr_t *) &original_shmdt);