From f20b6bdc88eb11a66284985f172168a2e9463028 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 27 Apr 2015 15:06:36 +0200 Subject: [PATCH] Prevent overlap of stack and thread-context members Now, Thread::Context provides the first word of the stack to prevent the overlapping of stack top and the 'stack_base' member. Fixes #1491 --- repos/base/include/base/thread.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repos/base/include/base/thread.h b/repos/base/include/base/thread.h index 321bbc0ed..6c0dfdd02 100644 --- a/repos/base/include/base/thread.h +++ b/repos/base/include/base/thread.h @@ -99,8 +99,11 @@ class Genode::Thread_base /** * Top of the stack is accessible via stack_top() + * + * Context provides the first word of the stack to prevent the + * overlapping of stack top and the 'stack_base' member. */ - long _stack[]; + addr_t _stack[1]; public: