forked from Bananymous/banan-os
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:
parent
2e6e0d0ef5
commit
392da37f9a
|
@ -142,7 +142,7 @@ namespace BAN
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr size_t m_size = sizeof(void*) * 4;
|
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 };
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue