From 2eee7a52e1d3ad5b623829784453a06c78efadef Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Mon, 16 Dec 2024 18:43:41 -0500 Subject: [PATCH] Export __asan_default_options for GCC Unlike Clang 15, GCC 11 seems require default symbol visibility. --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index c940042f7e..bf714a4790 100644 --- a/main.c +++ b/main.c @@ -72,9 +72,11 @@ main(int argc, char **argv) /* Compile in the ASAN options Ruby needs, rather than relying on environment variables, so * that even tests which fork ruby with a clean environment will run ASAN with the right * settings */ +RUBY_SYMBOL_EXPORT_BEGIN const char * __asan_default_options(void) { return "use_sigaltstack=0:detect_leaks=0"; } +RUBY_SYMBOL_EXPORT_END #endif