On 6. Dec 2021, at 23.09, Adrian Bunk <[email protected]> wrote:
>
> On Mon, Oct 25, 2021 at 08:54:45PM +0200, Christian Göttsche wrote:
>> The source of these test failure is LTO: it built fine with GCC 10.3
>> with LTO a month ago on buildd, GCC 11 without LTO works and Clang 13
>> with LTO also works.
>> So either there is some subtle undefined behaviour in dovecot (which
>> gets miscompiled) or the code generation in GCC 11 is buggy (maybe
>> related [1]).
>>
>> For the mean time the simplest solution is probably to disable LTO
>> ...
>
> Could you do this as temprorary workaround?
Looks like disabling the md4/md5 little-endian optimizations fixes this as
well. I'll try to figure out the proper fix in upstream.
diff --git a/src/lib/md4.c b/src/lib/md4.c
index 06e3231bde..798292a16f 100644
--- a/src/lib/md4.c
+++ b/src/lib/md4.c
@@ -42,7 +42,7 @@
* memory accesses is just an optimization. Nothing will break if it
* doesn't work.
*/
-#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
+#if 0 //defined(__i386__) || defined(__x86_64__) || defined(__vax__)
/* uint_fast32_t might be 64 bit, and thus may read 4 more bytes
* beyond the end of the buffer. So only read precisely 32 bits
*/
diff --git a/src/lib/md5.c b/src/lib/md5.c
index 6b5da6c307..c605639aa1 100644
--- a/src/lib/md5.c
+++ b/src/lib/md5.c
@@ -46,7 +46,7 @@
* memory accesses is just an optimization. Nothing will break if it
* doesn't work.
*/
-#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
+#if 0 //defined(__i386__) || defined(__x86_64__) || defined(__vax__)
#define SET(n) \
(*(const uint32_t *)&ptr[(n) * 4])
#define GET(n) \