...
Incorrectly using threads that asynchronously cancel may result in silent corruption, resource leaks, and, in the worst case, unpredictable interactions.
Rule | Severity | Likelihood |
|---|
Detectable | Repairable | Priority | Level |
|---|---|---|---|
POS47-C | Medium | Probable | No |
No |
P4 |
L1
Automated Detection
...
L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| bad-macro-use bad-macro-expansion | Supported | ||||||
| Axivion Bauhaus Suite |
| CertC-POS47 | |||||||
| Helix QAC |
| C5035 | |||||||
| Klocwork |
| CERT.POS.THREAD.ASYNC_CANCEL | |||||||
| Parasoft C/C++test |
| CERT_C-POS47-a | The function 'pthread_setcanceltype()' should not be called with 'PTHREAD_CANCEL_ASYNCHRONOUS' argument | ||||||
| PC-lint Plus |
| 586 | Fully supported | ||||||
| Polyspace Bug Finder |
| CERT C: Rule POS47-C | Checks for asynchronously cancellable thread (rule fully covered) | ||||||
| RuleChecker |
| bad-macro-use bad-macro-expansion | Supported |
Bibliography
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...
SEI CERT Oracle Coding Standard for Java: THI05-J. Do not use Thread.stop() to terminate threads
In Java, similar reasoning resulted in the deprecation of Thread.stop().
Bibliography
...
...