diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-09-27 19:55:32 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-11-14 21:58:28 +0300 |
commit | 3607a595f433d6dd4aead7520de6b13b1124688c (patch) | |
tree | 98a3c164590f54770ca0c33ac905114f90614aa3 | |
parent | 9d02a747fb16779a92093fbda260fed201f0fd72 (diff) | |
download | bdwgc-3607a595f433d6dd4aead7520de6b13b1124688c.tar.gz |
Fix disabling of automatic dynamic libraries registration
(a cherry-pick of commit 0d19067c3 from 'master')
Now, if GC_no_dls then GC_is_visible does not cause registration of
dynamic libraries.
* ptr_chck.c [!THREADS && (DYNAMIC_LOADING || MSWIN32 || MSWINCE
|| CYGWIN32 || PCR)] (GC_is_visible): Do not call
GC_register_dynamic_libraries() followed by GC_is_static_root()
if GC_no_dls.
-rw-r--r-- | ptr_chck.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -212,9 +212,10 @@ GC_API void * GC_CALL GC_is_visible(void *p) /* Else do it again correctly: */ # if defined(DYNAMIC_LOADING) || defined(MSWIN32) \ || defined(MSWINCE) || defined(CYGWIN32) || defined(PCR) - GC_register_dynamic_libraries(); - if (GC_is_static_root(p)) - return(p); + if (!GC_no_dls) { + GC_register_dynamic_libraries(); + if (GC_is_static_root(p)) return p; + } # endif goto fail; } else { |