summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-09-27 19:55:32 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-11-15 11:03:33 +0300
commite3c69a498cbaf1306e385b28c0d1e6c7bee6099d (patch)
treed061e41eb78ec14e8fff9b12ee729ca9bb6f21b4
parent869cd0a026e508e0a62cce5056dbd445ff7854ed (diff)
downloadbdwgc-e3c69a498cbaf1306e385b28c0d1e6c7bee6099d.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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ptr_chck.c b/ptr_chck.c
index 687aabe6..716336a4 100644
--- a/ptr_chck.c
+++ b/ptr_chck.c
@@ -207,9 +207,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 {