Rule Definition
Recursive calls can be unpredictable with regard to consumption of resources, especially memory. Under certain condition, a function or procedure using a recursive call can keep calling itself and as each call consumes memory, the entire application runs out of memory.
Recursive calls are known to be difficult to test for because the termination condition and thus the resource consumption might be dependent on the data used for the test. For all these reasons, it is often forbidden and limited to academic usage rather than for mission-critical systems. Because the flip side is complexity, such a trade-off should be carefully chosen by architects or senior developers, balancing cost with reliability and in all cases the conditions under which it is used should be reviewed in details.
Remediation
Review the Function / Procedure design
Related Technologies
ASP
JCL
DB2 Server
Forms
Visual Basic
.Net
Cobol
C++
PL/SQL
JEE
Microsoft T-SQL
Sybase T-SQL
DB2 z/OS
FLEX
SHELL
PHP
HTML5
SQLScript
SOA_UA_Assistant
BTT
Technical Criterion
Complexity - Algorithmic and Control Structure Complexity
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.