
VerOStack Makes Worst-case Stack Analysis Easy
After VerOStack calculates the worst-case stack sizes for all the static function calls in your application, it provides a convenient way to account for the potential occurrence of dynamic execution elements. Dynamic execution elements occur when calls of functions are only known when the program is running. To resolve these, the VerOStack user (often the application developer) must help to constrain the intended behavior. VerOStack simplifies this process by providing the user with numerous options to help resolve dynamic stack-sizing issues.
Constructing a Calling Tree
The tool analyzes the executable image and calculates the calling graph of the program and the stack used by every function. Typically this means finding all branch-and-link instructions. This is the easy part.
Indirect Calls
The application may contain indirect calls, i.e., call of a routine that is identified by a pointer. As VerOStack cannot determine which routine is being called, a reference to the routine’s location is provided. Using a special VerOStack call table editor, the user can provide the identity of single or multiple functions being called. VerOStack then selects largest stack usage of each potential call and uses this in subsequent computations.
Worst-case Stack Size Table
When the references are completed by the user, VerOStack produces a table that specifies the worst-case stack used for every stack in the application.
The application developer should then check that the stack size claimed during the creation of the task (a default size is provided by the operating system if a size is not given) is large enough to hold the worst-case stack required.
The VerOStack results may be output in XML or comma delimited form so that they can be archived or fed to another process. VerOStack results may also be formed into an HTML report file through the use of a stylesheet.
Factoring-in Stack used by the Operating System
VerOStack is system-independent; it will measure the worst-case stack use from any starting point, even entry points in an operating system such as API calls.
