mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-21 02:42:18 +00:00
* Fix tests with GCC 15 (upstream PR#229, bug #939857). The test had a bogus assertion which was exposed by GCC 15. * Fix tests with LTO (upstream PR#230). I was convinced that I'd backported these fixes already but apparently not. This one fixes a real problem where dovecot would be miscompiled because of strict aliasing violations in the md4+md5 code. Thanks to parona for the help with (re-)testing it and confirming the fixes. * Pass --disable-hardening because it just copies the defaults even on vanilla profiles these days. For hardened, it actually makes things less safe because it does -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 which overrides the default of -D_FORTIFY_SOURCE=3 there. Closes: https://bugs.gentoo.org/939857 Signed-off-by: Sam James <sam@gentoo.org>
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
https://github.com/dovecot/core/pull/229
|
|
|
|
From aaeabfec1abd0d4f2b68819a1afee51defd62e3c Mon Sep 17 00:00:00 2001
|
|
From: Sam James <sam@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
|
|
--- a/src/lib/test-data-stack.c
|
|
+++ b/src/lib/test-data-stack.c
|
|
@@ -188,7 +188,6 @@ static void test_ds_buffers(void)
|
|
void *b = t_buffer_get(1000);
|
|
void *a = 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();
|
|
|