GNU-ARM -fstack-protector incompatible with the QP ports to GNU-ARM
Real-Time Embedded Frameworks based on active objects & state machines
Brought to you by:
quantum-leaps
Code compiled with GNU-ARM and the -fstack-protector-all option fails by corrupting the stack. The problem is in the GNU-ARM-specific port files (qk_port.c
, qv_port.c
and qxk_port.c
), which produce corrupted stack when compiled with the option -fstack-protector-all.
The suggested solution is to add the attribute((optimize("-fno-stack-protector")))
specification to the "naked" functions in the port files (qk_port.c
, qv_port.c
and qxk_port.c
):
__attribute__ ((naked, optimize("-fno-stack-protector"))) void PendSV_Handler(void) { ~ ~ ~ }
--MMS
Anonymous
Fixed in QP 6.3.3.
--MMS