Thread stack alignment assertion
Posted: Wed Jan 22, 2025 1:32 am
Hi, I'm running off of pretty close to master on GitHub, and I'm hitting this assertion: https://github.com/ChibiOS/ChibiOS/blob ... ads.c#L392 (I'm not doing anything unusual, it's a normal statically allocated thread I'm trying to start). STM32F0, so armv6m.
stktop gets aligned on PORT_NATURAL_ALIGN (4), but then we check that it's aligned to PORT_STACK_ALIGN (8). Is that intentional? Shouldn't it get aligned on PORT_STACK_ALIGN instead?
If I skip the assertion (or change the math for stktop to use PORT_STACK_ALIGN), the firmware works fine, as it did on older ChibiOS.
stktop gets aligned on PORT_NATURAL_ALIGN (4), but then we check that it's aligned to PORT_STACK_ALIGN (8). Is that intentional? Shouldn't it get aligned on PORT_STACK_ALIGN instead?
If I skip the assertion (or change the math for stktop to use PORT_STACK_ALIGN), the firmware works fine, as it did on older ChibiOS.