
Worst-case Stack Analysis with VerOStack
VerOStack calculates the worst-case stack usage for programs written in Ada, C, C++, or Assembly languages.
Other tools record a “high water” mark during functional testing to estimate the worst-case stack use. This is a dynamic measure which shows how much of the stack was used during execution. This estimation will only be accurate if the tests call functions in the worst-case order. Unless the size of each functions' stack-frame is known, it is difficult to estimate the set of function calls that will result in the true “high water” mark, and it is often even more difficult to devise tests that ensure this calling sequence is made. The size of a functions' stack-frame depends on data declared by the user, as well as any data structures inserted by the compiler for holding temporary results.
VerOStack calculates the worst-case stack use by analyzing the executable image of an application. This can also include the stack(s) used by the operating system, for an operating system that has also been analyzed by VerOStack.

- VerOStack scans the executable image; it finds all functions; and determines how much stack each of the functions uses, i.e. the stack-frame size for each function.
- The application developer then uses the VerOStack editor to specify the entry point of the application and the procedures that represent tasks/processes in the application, if any (as each of these has its own stack).
- VerOStack then analyses the calling graph of the application.
It detects:
- All direct function calls
- direct and indirect recursion,
- use of calls via pointers
- indirect calls (e.g. method calls via dispatch tables in C++).
· If the application uses dynamic behavior (e.g. calls via pointers), VerOStack indicates where the application developer must resolve this to calculate the worst-case stack usage for the entire application. The VerOStack editor is used to resolve these indirect calls.
· The VerOStack editor is used to resolve these indirections. Using this information, VerOStack calculates the worst-case stack size for each stack in the application and generates reports which can be used as evidence in a certification data package.
A qualification package is available so that it may be used as a verification tool in a DO-178B certification.
The VerOStack tool is currently being used on the Boeing 787 program.
VerOStack can be used to analyze the stack depth used by the operating system that supports your application. Currently, the only restriction on VerOStack is that the compilation units linked together used the same compilers recommended for the Wind River VxWorks 653 ® operating systems, as they share common GNU-based code generators.
Please click here to learn about analyzing operating system stack depths >>
