From 392da37f9ad3c3148b0a1294240c9e1251df5e31 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 9 Mar 2023 01:42:17 +0200 Subject: [PATCH] BAN: Function storage is now aligned as CallableBase and not max_align_t On 32 bit architecture the alignment of 16 bytes did not seem to work on stack variables. UBSan detected whole lot of misaligned functions from Ext2.cpp. This patch should make function alignment be big enough? --- BAN/include/BAN/Function.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BAN/include/BAN/Function.h b/BAN/include/BAN/Function.h index 33e4a3618..fed03695f 100644 --- a/BAN/include/BAN/Function.h +++ b/BAN/include/BAN/Function.h @@ -142,7 +142,7 @@ namespace BAN private: static constexpr size_t m_size = sizeof(void*) * 4; - alignas(max_align_t) uint8_t m_storage[m_size] { 0 }; + alignas(CallableBase) uint8_t m_storage[m_size] { 0 }; }; } \ No newline at end of file