From 5f422a9d07332dd68f7e5178e73f4d01ffd37ae1 Mon Sep 17 00:00:00 2001 From: ximus Date: Fri, 12 Jun 2015 16:02:40 -0700 Subject: [PATCH] Fix write of thread stack end marker Only the lower half of the stack end marker is being writtem to the stack buffer end. --- core/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/thread.c b/core/thread.c index 4f2088cfb6..618c3d1f86 100644 --- a/core/thread.c +++ b/core/thread.c @@ -161,7 +161,7 @@ kernel_pid_t thread_create(char *stack, int stacksize, char priority, int flags, } else { /* create stack guard */ - *stack = (uintptr_t) stack; + *(uintptr_t *) stack = (uintptr_t) stack; } #endif