diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4c005a9a..3be797d21 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -492,6 +492,21 @@ cross-mingw64: - _build/gthread/libgthread-2.0-0.dll - _build/gobject/libgobject-2.0-0.dll +# A note about msys2: it’s a rolling release distribution, running Windows under +# Docker isn’t really supported, and the win32-ps CI runner is shared. All that +# adds up to mean that we have to run CI against the latest msys2 packages, and +# that this occasionally causes build failures in GLib due to changes in msys2. +# In order to avoid that pre-empting other GLib development, the policy in such +# cases is to: +# 1. Immediately and without hesitation make the msys2-* CI jobs non-fatal +# (add `allow_failure: true` below). +# 2. File an issue about fixing the GLib msys2 build and re-enabling failure +# on the CI job +# 3. Set the milestone for that issue to be the next GLib release, so it’s done +# in a timely manner; and tag it as ~win32 so the GLib Windows maintainers +# are notified and can work on it. +# 4. Rebase any pending broken MRs on top of the commit which makes the CI job +# non-fatal, so that development on `main` is unblocked. msys2-mingw32: extends: .only-default-and-merges stage: build @@ -520,6 +535,7 @@ msys2-mingw32: - _coverage/ - _reference/ +# See the note about msys2 CI job failure policy above. msys2-clang64: extends: .only-schedules-or-manual stage: build diff --git a/docs/supported-platforms.md b/docs/supported-platforms.md index 74dd01d1a..f883f74b2 100644 --- a/docs/supported-platforms.md +++ b/docs/supported-platforms.md @@ -41,7 +41,7 @@ GLib is regularly built on at least the following systems: - Fedora (34, https://gitlab.gnome.org/GNOME/glib/-/blob/main/.gitlab-ci/fedora.Dockerfile) - Debian (Bullseye, https://gitlab.gnome.org/GNOME/glib/-/blob/main/.gitlab-ci/debian-stable.Dockerfile) - Windows (MinGW64) - - Windows (msys2-mingw32) + - Windows (msys2-mingw32 and msys2-clang64; msys2 is a rolling release distribution) - Windows (Visual Studio 2017, and a static linking version) - Android (NDK r23b, API 31, arm64, https://gitlab.gnome.org/GNOME/glib/-/blob/main/.gitlab-ci/android-ndk.sh) - FreeBSD (12 and 13) diff --git a/glib/gnulib/vasnprintf.c b/glib/gnulib/vasnprintf.c index a5b68db8c..7e151b462 100644 --- a/glib/gnulib/vasnprintf.c +++ b/glib/gnulib/vasnprintf.c @@ -379,7 +379,7 @@ multiply (mpn_t src1, mpn_t src2, mpn_t *dest) { /* src1 or src2 is zero. */ dest->nlimbs = 0; - dest->limbs = (mp_limb_t *) malloc (1); + dest->limbs = (mp_limb_t *) malloc (sizeof (mp_limb_t)); } else { diff --git a/glib/tests/atomic.c b/glib/tests/atomic.c index 9d57d2114..82c5c9e14 100644 --- a/glib/tests/atomic.c +++ b/glib/tests/atomic.c @@ -136,6 +136,7 @@ test_types (void) * to make sure that we don’t warn when built against older third party code. */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" +#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" g_atomic_pointer_set (&vp_str_vol, NULL); g_atomic_pointer_set (&vp_str, str); res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, str); diff --git a/glib/tests/mem-overflow.c b/glib/tests/mem-overflow.c index f19534102..b8b65c17a 100644 --- a/glib/tests/mem-overflow.c +++ b/glib/tests/mem-overflow.c @@ -71,11 +71,11 @@ MEM_OVERFLOW_TEST (new0_b, p = g_new0 (X, b)) MEM_OVERFLOW_TEST (renew_a, p = g_malloc (1); p = g_renew (X, p, a)) MEM_OVERFLOW_TEST (renew_b, p = g_malloc (1); p = g_renew (X, p, b)) -MEM_OVERFLOW_TEST_FULL (aligned_alloc_a, p = g_aligned_alloc (sizeof(X), a, 16), g_aligned_free) -MEM_OVERFLOW_TEST_FULL (aligned_alloc_b, p = g_aligned_alloc (sizeof(X), b, 16), g_aligned_free) +MEM_OVERFLOW_TEST_FULL (aligned_alloc_a, p = g_aligned_alloc (a, sizeof(X), 16), g_aligned_free) +MEM_OVERFLOW_TEST_FULL (aligned_alloc_b, p = g_aligned_alloc (b, sizeof(X), 16), g_aligned_free) -MEM_OVERFLOW_TEST_FULL (aligned_alloc0_a, p = g_aligned_alloc0 (sizeof(X), a, 16), g_aligned_free) -MEM_OVERFLOW_TEST_FULL (aligned_alloc0_b, p = g_aligned_alloc0 (sizeof(X), b, 16), g_aligned_free) +MEM_OVERFLOW_TEST_FULL (aligned_alloc0_a, p = g_aligned_alloc0 (a, sizeof(X), 16), g_aligned_free) +MEM_OVERFLOW_TEST_FULL (aligned_alloc0_b, p = g_aligned_alloc0 (b, sizeof(X), 16), g_aligned_free) static void mem_overflow_malloc_0 (void)