...
Terminating a call to an exit handler in any way other than by returning is undefined behavior and may result in abnormal program termination or other unpredictable behavior. It may also prevent other registered handlers from being invoked.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
ENV32-C | Medium | Likely | Yes | NoMedium | P12 | L1 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| user_defined bad-function bad-function-use | Soundly supported | ||||||
| Axivion Bauhaus Suite |
| CertC-ENV32 | |||||||
| CodeSonar |
| BADFUNC.ABORT | Use of abort | ||||||
| Compass/ROSE | Can detect violations of this rule. In particular, it ensures that all functions registered with | ||||||||
| Cppcheck Premium | 24.9.0 | premium-cert-env32-c | |||||||
| Helix QAC |
| DF4856, DF4857, DF4858 | |||||||
| Klocwork |
| CERT.EXIT.HANDLER_TERMINATE | |||||||
| LDRA tool suite |
| 122 S 7 S | Enhanced enforcement | ||||||
| Parasoft C/C++test |
| CERT_C-ENV32-a | Properly define exit handlers | ||||||
| CERT C: Rule ENV32-C | Checks for abnormal termination of exit handler (rule fully covered) | |||||||
| RuleChecker |
| bad-function bad-function-use | Supported |
...