From: Ivan Maidanski Date: Wed, 16 Aug 2017 22:39:16 +0000 (+0300) Subject: Fix visibility of __asan_default_options in case of shared library X-Git-Tag: v7.6.2~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a89654d67bfb1f43d4f6ceb19ce9720bc2d96f6;p=gc Fix visibility of __asan_default_options in case of shared library (fix commit ce75cf1) * os_dep.c [ADDRESS_SANITIZER && (UNIX_LIKE || NEED_FIND_LIMIT || MPROTECT_VDB)] (__asan_default_options): Do not define if CUSTOM_ASAN_DEF_OPTIONS is defined; export it (use GC_API). --- diff --git a/os_dep.c b/os_dep.c index 03ba6bf8..cce2e6b0 100644 --- a/os_dep.c +++ b/os_dep.c @@ -507,9 +507,11 @@ GC_INNER char * GC_get_maps(void) #endif /* NETBSD */ #if defined(ADDRESS_SANITIZER) && (defined(UNIX_LIKE) \ - || defined(NEED_FIND_LIMIT) || defined(MPROTECT_VDB)) + || defined(NEED_FIND_LIMIT) || defined(MPROTECT_VDB)) \ + && !defined(CUSTOM_ASAN_DEF_OPTIONS) /* To tell ASan to allow GC to use its own SIGBUS/SEGV handlers. */ - const char *__asan_default_options(void) + /* The function is exported just to be visible to ASan library. */ + GC_API const char *__asan_default_options(void) { return "allow_user_segv_handler=1"; }