flâneur

knurling-rs/flip-link: Adds zero-cost stack overflow protection to your embedded programs ·

github.com · 758 words · saved by 1 readers

Adds zero-cost stack overflow protection to your embedded programs - knurling-rs/flip-link

adds zero-cost stack overflow protection to your embedded programs The problem Bare metal Rust programs may not be memory safe in presence of stack overflows. For example, this is the case for Rust programs based on v0.6.x of the cortex-m-rt crate. The following program, which contains no unsafe code block, can run into undefined behavior if it reaches a stack overflow condition. // static variables placed in the .bss / .data sections static FLAG1: AtomicBool = AtomicBool::new(false); // .bss static FLAG2: AtomicBool = AtomicBool::new(true); // .data fn main() { let _x = fib(100); }…

saved by

related reading