[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:54:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86130
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't know the original reason for handling null pointers here, but it's
consistent with glibc's printf which prints "(null)" when a null pointer is
provided for a %s specifier.
Removing this longstanding behaviour now could break an unnknown number of
programs which are (impicitly or explicitly) relying on this behaviour of
libstdc++.
It's not at all clear to me that crashing is preferable.
More information about the Gcc-bugs
mailing list