The document discusses stack overflow issues in embedded systems. It notes that stack overflow can occur if the stack size is not properly analyzed, recursion is used, or the stack is not protected by memory. Stack overflow can corrupt memory, cause crashes, and enable security exploits. The document recommends using static analysis and stack sentinels to determine the worst-case stack size and detect overflows at runtime. It also advises avoiding recursion and being aware of large data structures.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
16 views
11 StackOverflow
The document discusses stack overflow issues in embedded systems. It notes that stack overflow can occur if the stack size is not properly analyzed, recursion is used, or the stack is not protected by memory. Stack overflow can corrupt memory, cause crashes, and enable security exploits. The document recommends using static analysis and stack sentinels to determine the worst-case stack size and detect overflows at runtime. It also advises avoiding recursion and being aware of large data structures.
Use MMU hardware protection if you have it Use sentinels & periodic check to detect stack overflow – Also helps with experimental confirmation of depth analysis
Avoid recursion – makes worst case problematic
Be mindful that big data structures can make stack big Dmitri Popov CC SA 3.0