opal/memory: disable __malloc_initialize_hook if poisoned
Newer versions of gcc have "poisoned" the __malloc_initialize_hook name and it can no longer be used. Added a configure check and protection around its usage. Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
родитель
c2a02ab06c
Коммит
7018aeda2b
@ -854,7 +854,7 @@ OPAL_SEARCH_LIBS_CORE([ceil], [m])
|
||||
# -lrt might be needed for clock_gettime
|
||||
OPAL_SEARCH_LIBS_CORE([clock_gettime], [rt])
|
||||
|
||||
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty getpwuid fork waitpid execve pipe ptsname setsid mmap tcgetpgrp posix_memalign strsignal sysconf syslog vsyslog regcmp regexec regfree _NSGetEnviron socketpair strncpy_s usleep mkfifo dbopen dbm_open statfs statvfs setpgid setenv])
|
||||
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty getpwuid fork waitpid execve pipe ptsname setsid mmap tcgetpgrp posix_memalign strsignal sysconf syslog vsyslog regcmp regexec regfree _NSGetEnviron socketpair strncpy_s usleep mkfifo dbopen dbm_open statfs statvfs setpgid setenv __malloc_initialize_hook])
|
||||
|
||||
# Sanity check: ensure that we got at least one of statfs or statvfs.
|
||||
if test $ac_cv_func_statfs = no && test $ac_cv_func_statvfs = no; then
|
||||
|
@ -99,6 +99,8 @@
|
||||
#endif
|
||||
#include "ompi/runtime/ompi_cr.h"
|
||||
|
||||
/* newer versions of gcc have poisoned this deprecated feature */
|
||||
#if HAVE___MALLOC_INITIALIZE_HOOK
|
||||
#include "opal/mca/memory/base/base.h"
|
||||
/* So this sucks, but with OPAL in its own library that is brought in
|
||||
implicity from libmpi, there are times when the malloc initialize
|
||||
@ -106,6 +108,7 @@
|
||||
from here, since any MPI code is going to call MPI_Init... */
|
||||
OPAL_DECLSPEC void (*__malloc_initialize_hook) (void) =
|
||||
opal_memory_base_malloc_init_hook;
|
||||
#endif
|
||||
|
||||
/* This is required for the boundaries of the hash tables used to store
|
||||
* the F90 types returned by the MPI_Type_create_f90_XXX functions.
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user