Coredump

Puneet Singhal puneet@opussoft.com
Wed Dec 13 20:56:00 GMT 2000


The same code works fine on NCR UNIX
When we port the same code to Solaris Sparc it gives a core dump why??


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [ mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Alexandre Oliva
Sent: Wednesday, December 13, 2000 12:40 PM
To: Puneet Singhal
Cc: Gcchelp
Subject: Re: Coredump


On Dec 13, 2000, "Puneet Singhal" <puneet@opussoft.com> wrote:

> 	char *p=NULL;
> 	printf("%s", p);

> I get a coredump at runtime.

What did you expect?  You tell it to print a NUL-terminated string,
and don't give it a string at all.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


More information about the Gcc-help mailing list