JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
C and C++


LANG.STRUCT.CALLSTACK : Excessive Stack Depth

Summary

The size of the program call stack exceeds a previously-specified limit.

Properties

Class Name Excessive Stack Depth
Significance style
Mnemonic LANG.STRUCT.CALLSTACK
Categories
CWE CWE:400 Uncontrolled Resource Consumption
  CWE:410 Insufficient Resource Pool
Availability Available for C and C++.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Excessive Stack Depth"

Example

void bigbuf(void){
    char buf[1201329834]; 
    /* ... */
}

void lang_struct_callstack(void){  /* 'Excessive Stack Depth' warning issued here */
    bigbuf();
}

Notes

Excessive Stack Depth warnings are associated with the function call that causes stack depth to be exceeded.

Important configuration file parameters for this warning class are:

STACK_DEPTH_THRESHOLD The call stack size (in bytes) beyond which a warning will be issued.
STACK_DEPTH_UNDEFINED_FUNCTION_SIZE,
STACK_DEPTH_COMPILER_PADDING,
STACK_DEPTH_ACTIVATION_RECORD_CONSTANTS
Allow users to specify estimates of the amount of call stack space required for various program artifacts.

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.

 

To report problems with this documentation, please visit https://support.codesecure.com/.