Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:computersalat:devel:mail
dovecot23
fix-strict-aliasing.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-strict-aliasing.patch of Package dovecot23
From 7932dc8457c56cfde21e45a64a2494968a707c81 Mon Sep 17 00:00:00 2001 From: Martin Liska <mliska@suse.cz> Date: Fri, 24 Mar 2023 13:33:13 +0100 Subject: [PATCH] Fix violation of strict aliasing. The following issue is already reported here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=997513 and the problem is in the following statement: *(const uint32_t *)&ptr[(n) * 4] that yields a miscompilation when LTO is enabled. --- src/lib/md4.c | 18 ------------------ 1 file changed, 18 deletions(-) Index: src/lib/md4.c =================================================================== --- src/lib/md4.c.orig +++ src/lib/md4.c @@ -34,23 +34,6 @@ (a) = ((a) << (s)) | ((a) >> (32 - (s))) -/* - * SET reads 4 input bytes in little-endian byte order and stores them - * in a properly aligned word in host byte order. - * - * The check for little-endian architectures which tolerate unaligned - * memory accesses is just an optimization. Nothing will break if it - * doesn't work. - */ -#if 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 - */ -#define SET(n) \ - (*(const uint32_t *)&ptr[(n) * 4]) -#define GET(n) \ - SET(n) -#else #define SET(n) \ (ctx->block[(n)] = \ (uint_fast32_t)ptr[(n) * 4] | \ @@ -59,7 +42,6 @@ ((uint_fast32_t)ptr[(n) * 4 + 3] << 24)) #define GET(n) \ (ctx->block[(n)]) -#endif /* * This processes one or more 64-byte data blocks, but does NOT update Index: src/lib/md5.c =================================================================== --- src/lib/md5.c.orig +++ src/lib/md5.c @@ -38,20 +38,6 @@ (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \ (a) += (b); -/* - * SET reads 4 input bytes in little-endian byte order and stores them - * in a properly aligned word in host byte order. - * - * The check for little-endian architectures which tolerate unaligned - * memory accesses is just an optimization. Nothing will break if it - * doesn't work. - */ -#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) -#define SET(n) \ - (*(const uint32_t *)&ptr[(n) * 4]) -#define GET(n) \ - SET(n) -#else #define SET(n) \ (ctx->block[(n)] = \ (uint_fast32_t)ptr[(n) * 4] | \ @@ -60,7 +46,6 @@ ((uint_fast32_t)ptr[(n) * 4 + 3] << 24)) #define GET(n) \ (ctx->block[(n)]) -#endif /* * This processes one or more 64-byte data blocks, but does NOT update
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor