hrev43737 adds 1 changeset to branch 'master' old head: 3e2017d24e3912c42e583a508caea971a195f666 new head: 88520e79d880a7631e3a7dd02c27df84c4602cd3 ---------------------------------------------------------------------------- 88520e7: create_thread_user_stack(): Fix incorrect handling of TLS size In case a custom stack was given, the TLS size was subtracted from the stack base, not the stack size. [ Ingo Weinhold <ingo_weinhold@xxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev43737 Commit: 88520e79d880a7631e3a7dd02c27df84c4602cd3 URL: http://cgit.haiku-os.org/haiku/commit/?id=88520e7 Author: Ingo Weinhold <ingo_weinhold@xxxxxx> Date: Sun Feb 12 14:03:38 2012 UTC ---------------------------------------------------------------------------- 1 files changed, 2 insertions(+), 4 deletions(-) src/system/kernel/thread.cpp | 6 ++---- ---------------------------------------------------------------------------- diff --git a/src/system/kernel/thread.cpp b/src/system/kernel/thread.cpp index e6567a1..f657d32 100644 --- a/src/system/kernel/thread.cpp +++ b/src/system/kernel/thread.cpp @@ -793,10 +793,8 @@ create_thread_user_stack(Team* team, Thread* thread, void* _stackBase, if (stackSize < MIN_USER_STACK_SIZE) return B_BAD_VALUE; - stackBase -= TLS_SIZE; - } - - if (stackBase == NULL) { + stackSize -= TLS_SIZE; + } else { // No user-defined stack -- allocate one. For non-main threads the stack // will be between USER_STACK_REGION and the main thread stack area. For // a main thread the position is fixed.