summaryrefslogtreecommitdiff
path: root/ptr_chck.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-09-27 19:55:32 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-09-27 19:55:32 +0300
commit0d19067c37097e3384a4e2a65910cc158bbdfd58 (patch)
tree500faf7924fc61333f69e17d5094326701cc7e4d /ptr_chck.c
parentf55f26caf1f4a5ff17364a955162db7c5bdf273f (diff)
downloadbdwgc-0d19067c37097e3384a4e2a65910cc158bbdfd58.tar.gz
Fix disabling of automatic dynamic libraries registration
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.
Diffstat (limited to 'ptr_chck.c')
-rw-r--r--ptr_chck.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ptr_chck.c b/ptr_chck.c
index 9838601c..0cc8a726 100644
--- a/ptr_chck.c
+++ b/ptr_chck.c
@@ -208,8 +208,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 {