This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/41776] New: Segmentation fault printf(NULL\n)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]