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]

Re: "Hello World" core dumps


> 
> 
> The following causes a core dump on a Solaris-2.[567] and on a
> i386-linux 
> 
> 	#include <stdio.h>
> 
> 	int main()
> 	{
> 		unsigned char buf[10000000];
> 		printf("Hello World\n");
> 	}
> 
> This is a snippet from a real-life application.
> 
> Any thoughts?
> 
> -- Gaby
> 

Check the system limits (ulimit -a from (ba)sh-type shells).
I'd suspect you're exceeding the stack limit.

/Mike


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