...
The C++ Standard, [support.runtime], paragraph 4 [ISO/IEC 14882-2014], states:
The function signature
longjmp(jmp_buf jbuf, int val)
has more restricted behavior in this International Standard. Asetjmp
/longjmp
call pair has undefined behavior if replacing thesetjmp
andlongjmp
bycatch
andthrow
would invoke any non-trivial destructors for any automatic objects.
...
Search for other vulnerabilities resulting from the violation of this rule on the CERT website.
Bibliography
[Henricson 97] | Rule 13.3, Do not use setjmp() and longjmp() |
[ISO/IEC 14882-2014] | Subclause 18.10, "Other Runtime Support" |
...