From 91c0ba19864d285b079150d7774923cda83c6d20 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sun, 19 Oct 2025 22:13:40 +0300 Subject: [PATCH 1/2] Enforce pointer alignment for InlinedAllocation AssetReferences stored in inlined allocation needs to be aligned to pointer sized boundary due to atomic operations having strict requirements for such. Unaligned access seems to only crash on Windows on ARM systems when trying to allocate TextRender draw chunks. --- Source/Engine/Core/Memory/Allocation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Core/Memory/Allocation.h b/Source/Engine/Core/Memory/Allocation.h index d6958d2c3..ffd51d96c 100644 --- a/Source/Engine/Core/Memory/Allocation.h +++ b/Source/Engine/Core/Memory/Allocation.h @@ -208,7 +208,7 @@ public: typedef typename FallbackAllocation::template Data FallbackData; bool _useFallback = false; - byte _data[Capacity * sizeof(T)]; + alignas(sizeof(void*)) byte _data[Capacity * sizeof(T)]; FallbackData _fallback; public: From 6b9c727a6a538a1fda40053ce0fc908c66c449c9 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sun, 19 Oct 2025 22:16:30 +0300 Subject: [PATCH 2/2] Fix compiler warning --- Source/Engine/Scripting/ScriptingType.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Scripting/ScriptingType.h b/Source/Engine/Scripting/ScriptingType.h index cd7b05c73..b9735a5af 100644 --- a/Source/Engine/Scripting/ScriptingType.h +++ b/Source/Engine/Scripting/ScriptingType.h @@ -563,8 +563,8 @@ FORCE_INLINE int32 GetVTableIndex(void** vtable, int32 entriesCount, void* func) offset = ((*op & 0x3FFC00) >> 10) * ((*op & 0x40000000) != 0 ? 8 : 4); return offset / sizeof(void*); } - CRASH; } + CRASH; #elif defined(__clang__) // On Clang member function pointer represents the offset from the vtable begin. return (int32)(intptr)func / sizeof(void*);