mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
.gitlab-ci
docs
fuzzing
gio
glib
gmodule
AUTHORS
COPYING
gmodule-ar.c
gmodule-dl.c
gmodule-win32.c
gmodule.c
gmodule.h
gmodule.rc.in
gmoduleconf.h.in
meson.build
gobject
gthread
m4macros
po
subprojects
tests
.clang-format
.dir-locals.el
.gitattributes
.gitignore
.gitlab-ci.yml
AUTHORS
CONTRIBUTING.md
COPYING
HACKING
INSTALL.in
NEWS
NEWS.pre-1-3
README
README.md
README.rationale
README.win32
README.win32.md
check-abis.sh
clang-format-diff.py
glib-gettextize.in
glib.doap
glib.supp
meson.build
meson_options.txt
msvc_recommended_pragmas.h
template-tap.test.in
template.test.in
g_module_symbol() internally calls CreateToolhelp32Snapshot() which in some circumstances returns ERROR_BAD_LENGTH and according to the docs should lead to CreateToolhelp32Snapshot() being retried by the caller. This retry logic was missing and for example led to g_module_symbol() not succeeding if another thread happened to call the wrong function at the wrong time. This got noticed in the g-i build of gtk4 where g-i would call g_module_symbol() on all gtk4 _get_type symbols and while inspecting the properties gtk4 would spawn a thread calling SHGetSpecialFolderLocation() somewhere down the line. During the call to SHGetSpecialFolderLocation() CreateToolhelp32Snapshot() would return with ERROR_BAD_LENGTH for a short period of time and make g_module_symbol() fail, which lead to "Invalid GType function" errors in g-i. Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3213