http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60857
Bug ID: 60857 Summary: segmentation fault after called exit () with a large stack frame. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: c-aries at babyaries dot org Created attachment 32614 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32614&action=edit test case file $ cat test.c #include <stdlib.h> int main (int argc, char *argv[]) { int a[1024*1024*256]; exit (EXIT_SUCCESS); } $ gcc test.c $ ./a.out Segmentation fault $ cat test.c int main (int argc, char *argv[]) { int a[1024*1024*256]; return 0; } $ gcc test.c $ ./a.out $ echo $? 0 $ $ gcc --version gcc (GCC) 4.9.0 20140212 (experimental) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ /lib/i386-linux-gnu/libc.so.6 GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13, by Roland McGrath et al. Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.4.7. Compiled on a Linux 3.2.35 system on 2012-12-30. Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B libc ABIs: UNIQUE IFUNC For bug reporting instructions, please see: <http://www.debian.org/Bugs/>. $