diff --git a/src/module.c b/src/module.c index bb6fa80b2e..b60d7881b8 100644 --- a/src/module.c +++ b/src/module.c @@ -12275,14 +12275,13 @@ int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loa } int dlopen_flags = RTLD_NOW | RTLD_LOCAL; -#if !defined(__SANITIZE_ADDRESS__) && !defined(__APPLE__) +#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__SANITIZE_ADDRESS__) /* RTLD_DEEPBIND, which is required for loading modules that contains the * same symbols, does not work with ASAN. Therefore, we exclude * RTLD_DEEPBIND when doing test builds with ASAN. * See https://github.com/google/sanitizers/issues/611 for more details. - * This flag is also not available in macos, but the default symbol - * resolution behavior in macos is the same as when we use DEEPBIND in - * Linux. */ + * + * This flag is also currently only available in Linux and FreeBSD. */ dlopen_flags |= RTLD_DEEPBIND; #endif