can detect violations when an array is declared in a function and then a pointer to that array is returned
Section
Splint
Include Page
c:Splint_V
c:Splint_V
Section
Compass/ROSE
Section
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.
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.