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?
This commit is contained in:
Bananymous 2023-03-09 01:42:17 +02:00
parent 2e6e0d0ef5
commit 392da37f9a
1 changed files with 1 additions and 1 deletions

View File

@ -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 };
};
}