Flux Research Group / School of Computing

Eliminating stack overflow by abstract interpretation

No PDF availalbe

John Regehr, Alastair Reid, and Kirk Webb

ACM Trans. Embed. Comput. Syst. 4(4), November 2005.

DOI: 10.1145/1113830.1113833

Operating Systems


An important correctness criterion for software running on embedded microcontrollers is stack safety: a guarantee that the call stack does not overflow. Our first contribution is a method for statically guaranteeing stack safety of interrupt-driven embedded software using an approach based on context-sensitive dataflow analysis of object code. We have implemented a prototype stack analysis tool that targets software for Atmel AVR microcontrollers and tested it on embedded applications compiled from up to 30,000 lines of C. We experimentally validate the accuracy of the tool, which runs in under 10 sec on the largest programs that we tested. The second contribution of this paper is the development of two novel ways to reduce stack memory requirements of embedded software.