align stack to 16

This commit is contained in:
Vladislav Mikhalin 2026-04-19 09:37:55 +03:00
parent 854b291c63
commit 9141c19302

View File

@ -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 */