From e0aba8cb9edd3630be3b81e1f1c3e8bdaf728d1e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Sat, 27 Mar 2021 11:15:43 +0100 Subject: score: Fix task stack initialization Do not adjust the stack area begin address since this may confuse the stack allocator and result in failed stack frees. Account for the alignment overhead in the stack space size estimate. Check that the stack size is in the expected interval. --- cpukit/score/src/threadinitialize.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cpukit/score') diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 18c98c6995..9c1b809c3a 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -132,7 +132,6 @@ static bool _Thread_Try_initialize( stack_begin = config->stack_area; stack_end = stack_begin + config->stack_size; stack_align = CPU_STACK_ALIGNMENT; - stack_begin = (char *) RTEMS_ALIGN_UP( (uintptr_t) stack_begin, stack_align ); stack_end = (char *) RTEMS_ALIGN_DOWN( (uintptr_t) stack_end, stack_align ); /* Allocate floating-point context in stack area */ -- cgit v1.2.3