Re: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-03-02 Thread Sebastian Huber
Hello Kinsey, I think the root cause is that this is not necessarily stack aligned: On 01/03/2021 23:59, Kinsey Moore wrote: thread_config->stack_area = _Stack_Allocate( size ); Also this (easy to fix): /**  * @ingroup RTEMSAPIClassicTasks  *  * @brief This constant defines the recommended a

RE: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-03-01 Thread Kinsey Moore
s.org Subject: RE: [PATCH v1 1/2] score: Enforce stack_end alignment On 2021/02/19 01:08, Sebastian Huber wrote: > On 19/02/2021 07:12, Sebastian Huber wrote: >> I think the bug is in _TLS_Get_allocation_size(). It assumes >> CPU_HEAP_ALIGNMENT >= CPU_STACK_ALIGNMENT. It

RE: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-02-19 Thread Kinsey Moore
I'll make sure to address the proper use of RTEMS_ALIGN_* in the updated patch if it is still necessary, thanks! Kinsey -Original Message- From: Gedare Bloom Sent: Friday, February 19, 2021 10:55 To: Kinsey Moore Cc: devel@rtems.org Subject: Re: [PATCH v1 1/2] score: En

RE: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-02-19 Thread Kinsey Moore
On 2021/02/19 01:08, Sebastian Huber wrote: > On 19/02/2021 07:12, Sebastian Huber wrote: >> I think the bug is in _TLS_Get_allocation_size(). It assumes >> CPU_HEAP_ALIGNMENT >= CPU_STACK_ALIGNMENT. It should probably use the >> maximum of these two values. The only usage of CPU_HEAP_ALIGNMENT in

Re: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-02-19 Thread Gedare Bloom
On Thu, Feb 18, 2021 at 11:59 AM Kinsey Moore wrote: > > The size of the reserved TLS space is not guaranteed to adhere to stack > alignment requirements which can cause stack_end to become misaligned. > This enforces the alignment of stack_end. > --- > cpukit/score/src/threadinitialize.c | 4 +++

Re: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-02-18 Thread Sebastian Huber
On 19/02/2021 07:12, Sebastian Huber wrote: On 18/02/2021 19:59, Kinsey Moore wrote: The size of the reserved TLS space is not guaranteed to adhere to stack alignment requirements which can cause stack_end to become misaligned. This enforces the alignment of stack_end. ---   cpukit/score/src/t

Re: [PATCH v1 1/2] score: Enforce stack_end alignment

2021-02-18 Thread Sebastian Huber
On 18/02/2021 19:59, Kinsey Moore wrote: The size of the reserved TLS space is not guaranteed to adhere to stack alignment requirements which can cause stack_end to become misaligned. This enforces the alignment of stack_end. --- cpukit/score/src/threadinitialize.c | 4 1 file changed, 4