
...
Using the value of a pointer to a FILE
object after the associated file is closed is undefined behavior 153.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
---|---|---|---|---|---|---|
FIO46-C | Medium | Unlikely | No | NoMedium | P4P2 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Astrée |
| Supported | |||||||
CodeSonar |
| IO.UAC | Use after close | ||||||
Compass/ROSE | |||||||||
Coverity |
| USE_AFTER_FREE | Implemented | ||||||
Helix QAC |
| DF2696, DF2697, DF2698 | |||||||
Klocwork |
| SV.INCORRECT_RESOURCE_HANDLING.URH | |||||||
LDRA tool suite |
| 48 D | Partially implemented | ||||||
Parasoft C/C++test |
| CERT_C-FIO46-a | Do not use resources that have been freed | ||||||
PC-lint Plus |
| 2471 | Fully supported | ||||||
Polyspace Bug Finder |
| Checks for use of previously closed resource (rule partially covered) | |||||||
SonarQube C/C++ Plugin |
| S3588 |
...