...
produces, on a Linux machine running g++ 4.3:
Code Block |
---|
Before setjmp(): Instances: 0
func(): Instances: 1
From longjmp(): Instances: 1
After longjmp(): Instances: 1
|
...
On the same platform (Linux, g++ 4.3), this code produces:
Code Block |
---|
Before try: Instances: 0
func(): Instances: 1
In catch: Instances: 0
After catch: Instances: 0
|
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
ERR34-CPP | low | probable | medium | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
| Secondary Analysis |
Bibliography
[ISO/IEC 14882-2003] Section 18.7
[Henricson 97] Rule 13.3 Do not use setjmp()
and longjmp()
.
...
ERR33-CPP. Destructors must not throw exceptions 12012. Exceptions and Error Handling (ERR) ERR35-CPP. A handler in a constructor or destructor's function-try-block should not reference class data