Compile-time stack requirements analysis with GCC
Stack overflows are a major threat to many computer applications and run-time recovery techniques are not always available or appropriate. In such situations, it is of utmost value to prevent overflows from occurring in the first place, which requires evaluating the worst case stack space requirements of an application prior to operational execution time. More generally, as run-time stack areas need memory resources, information on the stack allocation patterns in software components is always of interest. We believe that specialized compiler outputs can be of great value in a stack usage analysis framework and have developed GCC extensions for this purpose. In this paper, we first expand on the motivations for this work, then describe what it consists of so far, future directions envisioned, and experiments results.
- Stack_Analysis.pdf - (52 KB)