Preview

Static Analysis for Stack Usage

Powerful Essays
Open Document
Open Document
3030 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Static Analysis for Stack Usage
08-02-10

Static Analysis Considerations for Stack Usage

Static Analysis Considerations for Stack Usage
ESC-423
Gerald T. Rigdon
Fellow, Software Engineering
Boston Scientific, Inc. gerald.rigdon@bsci.com Hiten Doshi
Fellow, Software Engineering
Boston Scientific, Inc. hiten.doshi@bsci.com Xin Zheng
Software Engineer
Boston Scientific, Inc. xin.zheng@bsci.com In [3], David N. Kleidermacher, chief technology officer at Green Hills Software, discussed future directions for static analysis. He identified that using static analyzers for detecting stack overflow conditions is a prime example of how having these capabilities in tools could be beneficial, especially in safety critical applications.
One particular tool that offers a solution is StackX from Express Logic, Inc. On their website [4], they state the following:
“StackX™ is a unique, patent pending, development tool that helps developers avoid stack overflow problems that traditionally have plagued embedded systems. StackX performs a comprehensive analysis of a complete application at the executable code level, computing the worst-case stack usage the application can experience. Express
Logic is the only RTOS company that can identify how large a stack customers need for each application thread and automatically alerts them if they fail to allocate sufficient memory!” The website [4] goes on to discuss how the decision to allocate memory for stack use has typically been a trial and error process and then quotes Jack Ganssle [2], who has been a long time contributor to Embedded Systems Magazine, as saying:
“With experience, one learns the standard, scientific way to compute the proper size for a stack: Pick a size at random and hope.”
Although it is not the goal of this paper to discuss the various COTS (Commercial Off
The Shelf) solutions for detecting stack overflow, we did take the liberty of inquiring about StackX for use with our firmware, but the tool did not



References: [1] Gerald Rigdon. Static Analysis Considerations for Medical Device Firmware. July, 2010. [2] Jack Ganssle. The Art of Designing Embedded Systems. Elsevier, 1999. [3] David N. Kleidermacher. Using static analysis to diagnose & prevent failures in safety-critical device designs. Published in Embedded.com. September, 2008 [4] Express Logic, Inc. StackX. http://www.rtos.com. 12

You May Also Find These Documents Helpful