]> git.ipfire.org Git - thirdparty/zlib-ng.git/commit
Fix UBSAN's cry afoul
authorAdam Stylinski <kungfujesus06@gmail.com>
Thu, 17 Mar 2022 02:52:44 +0000 (22:52 -0400)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 17 Mar 2023 20:27:56 +0000 (21:27 +0100)
commitb9957e95dcaf5a38655b84e65cbaf0a9bee022af
tree549eab9f16c4846f60fa176adc1c1ddf826aa587
parent1c9126065362a6a2d7799468bbb7db48105148d1
Fix UBSAN's cry afoul

Technically, we weren't actually doing this the way C wants us to,
legally.  The zmemcpy's turn into NOPs for pretty much all > 0
optimization levels and this gets us defined behavior with the
sanitizer, putting the optimized load by arbitrary alignment into the
compiler's hands instead of ours.

Backport note: Replaced zmemcpy with direct memcpy, as that is what we
end up with in a later commit anyway.
arch/x86/chunkset_avx.c
arch/x86/chunkset_sse.c