On Sat, Feb 6, 2021 at 7:38 AM Gregory Nutt wrote:
>
> > I am using NuttX-v10.0.1.
> > This is fixed in 625eef20f00fbe9bdb4995ad9dfb24b71227e954, which came at
> a
> > later time.
>
> Hmm.. I guess I still don't understand the failure. That change was:
>
> #ifdef CONFIG_STACK_COLORATION
>
I am using NuttX-v10.0.1.
This is fixed in 625eef20f00fbe9bdb4995ad9dfb24b71227e954, which came at a
later time.
Hmm.. I guess I still don't understand the failure. That change was:
#ifdef CONFIG_STACK_COLORATION
- if (tcb->pid != 0)
- {
- memset(tcb->stack_alloc_ptr,
Well.. it's not strange at all :)
I am using NuttX-v10.0.1.
This is fixed in 625eef20f00fbe9bdb4995ad9dfb24b71227e954, which came at a
later time.
I just tried master, which brought the expected results.
Thank you.
Στις Σάβ, 6 Φεβ 2021 στις 5:27 μ.μ., ο/η Gregory Nutt
έγραψε:
> On 2/6/2021 9:
On 2/6/2021 9:13 AM, Fotis Panagiotopoulos wrote:
Indeed I was expecting arm_usestack() to do the colorization, but
apparently it doesn't.
That is what is confusing because it does do the coloration:
https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/common/arm_usestack.c#L153
And the reason arm_usestack() fails to color the stack is because the
following check fails:
if (tcb->pid != 0)
During the task initialization, pid is still 0 so stack is not colored.
Στις Σάβ, 6 Φεβ 2021 στις 5:13 μ.μ., ο/η Fotis Panagiotopoulos <
f.j.pa...@gmail.com> έγραψε:
> Indeed I was
Indeed I was expecting arm_usestack() to do the colorization, but
apparently it doesn't.
I cannot have my application code to colorize the stack, as a call to
arm_stack_color() is needed. This is not exposed to the application as far
as i can tell.
> Also Assuming ARM it has to be 8 byte aligned.
You have to init the memory used for the stack:
Have a look in the normal tasking init , and you will see the call out to
init the stack, that you neeed to call.
arm_usestack() should be called in this case and won't that initialize
(colorize) the stack?
You have to init the memory used for the stack:
Have a look in the normal tasking init , and you will see the call out to
init the stack, that you neeed to call.
Also Assuming ARM it has to be 8 byte aligned. So you need attributes on
your variable called stack to set the alignment.
David
-O