[Bug libstdc++/86130] Expect SIGSEGV but program just silently exits
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 13 18:35:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86130
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And they don't test for iostream operations failing?
The program has undefined behaviour, i.e. a bug. Whether it's better to
identify that and treat it as a corrupt stream state (setting badbit, and
optionally throwing an exception) or crash the program depends on the program.
There's no single choice that's correct for all programs.
More information about the Gcc-bugs
mailing list