[packages/dovecot] add upstream patch for test failure with gcc 15
atler
atler at pld-linux.org
Sun Jan 25 01:30:39 CET 2026
commit 2fd18f42eed0ad9500544d600a0bc4c62e397af5
Author: Jan Palus <atler at pld-linux.org>
Date: Sun Jan 25 00:47:22 2026 +0100
add upstream patch for test failure with gcc 15
dovecot.spec | 2 ++
tests.patch | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
---
diff --git a/dovecot.spec b/dovecot.spec
index b04327e..c3fdd9d 100644
--- a/dovecot.spec
+++ b/dovecot.spec
@@ -30,6 +30,7 @@ Patch3: proc-status.patch
Patch4: openssl3.patch
Patch5: icu76.patch
Patch6: dovecot-lua-export-on-auth-fail.patch
+Patch7: tests.patch
URL: http://dovecot.org/
BuildRequires: autoconf
BuildRequires: automake
@@ -175,6 +176,7 @@ Pakiet programistyczny do tworzenia wtyczek dla Dovecota.
%patch -P4 -p1
%patch -P5 -p1
%patch -P6 -p1
+%patch -P7 -p1
%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
diff --git a/tests.patch b/tests.patch
new file mode 100644
index 0000000..089dedc
--- /dev/null
+++ b/tests.patch
@@ -0,0 +1,36 @@
+From 9f642dd868db6e7401f24e4fb4031b5bdca8aae7 Mon Sep 17 00:00:00 2001
+From: Sam James <sam at gentoo.org>
+Date: Sat, 28 Dec 2024 13:17:24 +0000
+Subject: [PATCH] lib: test-data-stack - Drop bogus assertion
+
+This assertion goes back to 992a1726a41b42fa47204565ff17f7c635fcb421 when
+test-data-stack.c was added.
+
+It starts to fail with (upcoming) GCC 15 which has improvements for
+optimising out redundant pointer-vs-pointer comparisons, specifically
+r15-580-gf3e5f4c58591f5 for gcc bug PR13962.
+
+Anyway, this is a problem for this assertion because t_malloc_no0
+is marked with `__attribute__((malloc))` which guarantees that the
+returned pointer doesn't alias, hence a == b must be false.
+
+Bug: https://bugs.gentoo.org/939857
+---
+ src/lib/test-data-stack.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/lib/test-data-stack.c b/src/lib/test-data-stack.c
+index c38da60fd0f..3c335976853 100644
+--- a/src/lib/test-data-stack.c
++++ b/src/lib/test-data-stack.c
+@@ -186,9 +186,8 @@ static void test_ds_buffers(void)
+ test_begin("data-stack buffer interruption");
+ T_BEGIN {
+ void *b = t_buffer_get(1000);
+- void *a = t_malloc_no0(1);
++ (void)t_malloc_no0(1);
+ void *b2 = t_buffer_get(1001);
+- test_assert(a == b); /* expected, not guaranteed */
+ test_assert(b2 != b);
+ } T_END;
+ test_end();
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dovecot.git/commitdiff/6e6e4be16b130adcbb0107ea986778db6df6325e
More information about the pld-cvs-commit
mailing list