From 9141c19302e8d6368f1a17634992947d706eb251 Mon Sep 17 00:00:00 2001 From: Vladislav Mikhalin Date: Sun, 19 Apr 2026 09:37:55 +0300 Subject: [PATCH] align stack to 16 --- src/core/libraries/kernel/threads/pthread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/libraries/kernel/threads/pthread.cpp b/src/core/libraries/kernel/threads/pthread.cpp index 2858375b1..eca81c6c0 100644 --- a/src/core/libraries/kernel/threads/pthread.cpp +++ b/src/core/libraries/kernel/threads/pthread.cpp @@ -208,7 +208,7 @@ static void RunThread(void* arg) { /* Run the current thread's start routine with argument: */ auto* const stack = - (void*)((size_t)curthread->attr.stackaddr_attr + curthread->attr.stacksize_attr); + (void*)(((size_t)curthread->attr.stackaddr_attr + curthread->attr.stacksize_attr) & (~15)); void* ret = _runOnAnotherStack(curthread->arg, (void*)curthread->start_routine, stack); /* Remove thread from tracking */