...
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Compass/ROSE | Can detect violations of this rule. It automatically detects returning pointers to local variables. Detecting more general cases, such as examples where static pointers are set to local variables which then go out of scope, would be difficult | ||||||||
6.5 | RETURN_LOCAL | Finds many instances where a function will return a pointer to a local stack variable. Coverity Prevent cannot discover all violations of this rule, so further verification is necessary | |||||||
7.6.0 | Can detect violations when an array is declared in a function and then a pointer to that array is returned | ||||||||
9.1 | LOCRET.* | ||||||||
8.5.4 | 42 D | Fully implemented | |||||||
PRQA QA-C | 8.1 | 3217 | Partially implemented | ||||||
Splint | 3.1.1 | ||||||||
PRQA QA-C++ |
| 2515, 2516, 2527, 2528, 4028, 4624, 4629 |
...
CERT C Secure Coding Standard | |
CERT C++ Secure Coding Standard | MSC00-CPP. Compile cleanly at high warning levels |
SO/IEC TR 24772:2013 | Dangling References to Stack Frames [DCM] |
ISO/IEC TS 17961 | Escaping of the address of an automatic object [addrescape] |
...
DCL19-CPP. Initialize automatic local variables on declaration 02002. Declarations and Initialization (DCL) DCL31-CPP. Do not define variadic functions