This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41776] New: Segmentation fault printf(NULL\n)
- From: "new_men at km dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Oct 2009 06:06:38 -0000
- Subject: [Bug c++/41776] New: Segmentation fault printf(NULL\n)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Segmentation fault on gcc 4.3.4
On gcc 3.4.6 not affected
gcc chk.c
g++ chk.cpp
======= chk.c or chk.cpp ========
#include <stdio.h>
int main()
{
char *mystr;
mystr=NULL;
printf("%s\n", mystr); //fault
// printf("%s", mystr); //not fault
// printf("%s\n%s\n", mystr, mystr); //not fault
return(0);
}
=================================
--
Summary: Segmentation fault printf(NULL\n)
Product: gcc
Version: 4.3.4
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: new_men at km dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41776