...
Failing to return a value from a code path in a value-returning function results in undefined behavior that might be exploited to cause data integrity violations.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
MSC52-CPP | Medium | Probable | Yes | MediumNo | P8 | L2 |
Automated Detection
Tool | Version | Checker | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| return-implicit | Fully checked | ||||||||||||||||||||||||
| Axivion Bauhaus Suite |
| CertC++-MSC52 | |||||||||||||||||||||||||
| Clang |
| -Wreturn-type | Does not catch all instances of this rule, such as function-try-blocks | ||||||||||||||||||||||||
| CodeSonar |
| LANG.STRUCT.MRS | Missing return statement Non-void noreturn, | ||||||||||||||||||||||||
| Helix QAC |
| C++2888DF2888 | |||||||||||||||||||||||||
| Klocwork |
| FUNCRET.GEN FUNCRET.IMPLICIT | |||||||||||||||||||||||||
| LDRA tool suite |
| 2 D, 36 S | Fully implemented | ||||||||||||||||||||||||
| Parasoft C/C++test |
| CERT_CPP-MSC52-a | All exit paths from a function, except main(), with non-void return type shall have an explicit return statement with an expression | ||||||||||||||||||||||||
| Polyspace Bug Finder |
| CERT C++: MSC52-CPP | Checks for missing return statements (rule partially covered) | SonarQube C/C++ Plugin||||||||||||||||||||||||
| PVS-Studio |
| SonarQube C/C++ Plugin
| SonarQube C/C++ Plugin
| S935 | PRQA QA-C++V591 | ||||||||||||||||||||||
| RuleChecker |
| PRQA QA-C++
| PRQA QA-C++
| 1510 | PVS-Studioreturn-implicit | Fully checked | |||||||||||||||||||||
| Security Reviewer - Static Reviewer |
| PVS
| Studio
| PVS
| Studio
| V591 | RuleChecker | ||||||||||||||||||||
| Include Page | RuleChecker_V | RuleChecker_V | return-implicit | Fully checkedRTOS_09 RTOS_10 RTOS_11 RTOS_12 | Fully implemented | ||||||||||||||||||||||
| SonarQube C/C++ Plugin |
| S935 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...