fabricedesre / cc3200-rs

Getting Rust to run on a TI cc3200
Mozilla Public License 2.0
7 stars 2 forks source link

Turn on more extensive stack checking. #34

Closed dhylands closed 7 years ago

fabricedesre commented 7 years ago

What happens with this change if there's a stack overflow?

dhylands commented 7 years ago

With configCHECK_FOR_STACK_OVERFLOW set to 1 or 2 then when a stack overflow is detected then it will call the vApplicationStackOverflowHook function here: https://github.com/fabricedesre/cc3200-rs/blob/master/cc3200-sys/board.c#L198

Here's a description of the 2 modes: http://www.freertos.org/Stacks-and-stack-overflow-checking.html

Since rust always clears memory, things like that large floating point buffer would probably trample the 16-byte marker that FreeRTOS puts at the end of the stack.