...
Returning from a function marked [[noreturn]] results in undefined behavior that might be exploited to cause data-integrity violations.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
MSC53-CPP | Medium | Unlikely | Yes | NoLow | P2P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| invalid-noreturn | Fully checked | ||||||
| Axivion Bauhaus Suite |
| CertC++-MSC53 | |||||||
| Clang |
| -Winvalid-noreturn | |||||||
| CodeSonar |
| LANG.STRUCT.RFNR | Return from noreturn | ||||||
| Helix QAC |
| DF2886 | |||||||
| Klocwork |
| CERT.MSC.NORETURN_FUNC_RETURNS | |||||||
| Parasoft C/C++test |
| CERT_CPP-MSC53-a | Never return from functions that should not return | ||||||
| Polyspace Bug Finder |
| CERT C++: MSC53-CPP | Checks for [[noreturn]] functions returning to caller (rule fully covered) | ||||||
| PVS-Studio |
| V1082 | |||||||
| RuleChecker |
| invalid-noreturn | Fully checked | ||||||
| SonarQube C/C++ Plugin |
| S935 |
...