From 72e73f2f81c12961ef87b67679ed601857c208fc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 17 Nov 2023 21:27:01 +0530 Subject: [PATCH] Fix alignment of output array in UTF8Decoder --- kitty/simd-string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/simd-string.h b/kitty/simd-string.h index 274e9d01c..df807ac70 100644 --- a/kitty/simd-string.h +++ b/kitty/simd-string.h @@ -16,8 +16,8 @@ typedef void (*control_byte_callback)(void *data, uint8_t ch); typedef void (*output_chars_callback)(void *data, const uint32_t *chars, unsigned count); typedef struct UTF8Decoder { + alignas(512/8) uint32_t output[512/8]; // we can process at most 512 bits of input (AVX512) so we get at most 64 chars of output struct { uint32_t cur, prev, codep; } state; - alignas(64) uint32_t output[64]; void *callback_data; control_byte_callback control_byte_callback;