This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10818] printf("%s\n", NULL) segfaults
- From: "kir at sacred dot ru" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 21 Oct 2009 07:45:37 -0000
- Subject: [Bug libc/10818] printf("%s\n", NULL) segfaults
- References: <20091021071432.10818.kir@sacred.ru>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From kir at sacred dot ru 2009-10-21 07:45 -------
Relevant GCC bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15685
Relevant portion of glibc doc [1]:
> If you accidentally pass a null pointer as the argument for a ?%s?
> conversion, the GNU library prints it as ?(null)?. We think this
> is more useful than crashing. But it's not good practice to pass
> a null argument intentionally.
[1]
http://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html#Other-Output-Conversions
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10818
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.