Hi,
Yes it happens on master (just tested a minute ago). I think everything
else is in order, but stack coloring is broken at the top of the stack,
if the stack size is not aligned.
-Jukka
On 25.9.2020 11.08, Schock, Johannes - NIVUS GmbH wrote:
Is this happening on master as well? I've commited a change (#1562 ) to ARM
stack management not long ago.
Perhaps I missed something.
I'll have a look.
Johannes
I just encountered a problem with do_stackcheck(), and wanted to ask for
an opinion...
In my (PX4) software I have got some threads, who define their stack
size unaligned by 4 bytes (uint32_t). The stack coloring works on
uint32, and thus doesn't color the topmost bytes of the stack when the
stack size is not aligned to 4.
The arm_checkstack.c: do_stackcheck() on the other hand starts the
coloring check at " start = alloc & ~3;", which is actually (partially)
outside the stack.
So in px4, I end up seeing stack usage 100% on some threads (in "ps"),
which I want to fix. So what would be the preferred way to fix this: