From 02fe256a0673e3245ff7a745f6f40bddf75fc9ba Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 4 Jun 2024 16:53:49 +0200 Subject: [PATCH] core/thread: don't try to align end of stack --- core/thread.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/thread.c b/core/thread.c index cd97c38d60..cb828b6df4 100644 --- a/core/thread.c +++ b/core/thread.c @@ -178,9 +178,6 @@ uintptr_t measure_stack_free_internal(const char *stack, size_t size) uintptr_t *stackp = (uintptr_t *)(uintptr_t)stack; uintptr_t end = (uintptr_t)stack + size; - /* better be safe than sorry: align end of stack just in case */ - end &= (sizeof(uintptr_t) - 1); - /* assume that the stack grows "downwards" */ while (((uintptr_t)stackp < end) && (*stackp == (uintptr_t)stackp)) { stackp++;