This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bug report
- From: Hayashi Eisuke <hayashi at dc dot ag dot asahi-kasei dot co dot jp>
- To: gcc-bugs at gcc dot gnu dot org
- Cc: Jim Wilson <wilson at specifix dot com>, Andrew Pinski <pinskia at physics dot uc dot edu>, Tetsuo Tokuda <tok at dc dot ag dot asahi-kasei dot co dot jp>
- Date: Fri, 09 Jun 2006 09:47:15 +0900
- Subject: Re: bug report
- References: <448787FB.57CC0D55@dc.ag.asahi-kasei.co.jp> <44889517.60108@specifix.com>
DEAR Sir : GNU
I am writing to you regarding bug report
It resulted based on the last point when having experimented ..the
following...
#include <stdio.h>
#include <values.h>
void subroutine(int n)
{
int buf[n];
fprintf(stderr, "%d (%d)\n", (int)sizeof(buf), (unsigned long)buf);
}
int main( int argc, char **argv)
{
int i, value[] = {2000000, 2500000, 3000000};
for (i=0; i<3; i++) {
fprintf(stderr, "%d: ", value[i]);
subroutine(value[i]);
}
exit(0);
}
① gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
stacksize 8192 kbytes
2000000: 8000000 (-1081748336)
2500000: segmentation fault (core dumped)
② gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)
stacksize 10240 kbytes
2000000: 8000000 (-1081748128)
2500000: 10000000 (-1083748128)
3000000: segmentation fault (core dumped)
It was not bug of gcc but it was a problem of stacksize.
Thanks.
Sincerely yours,
EISUKE HAYASHI
Jim Wilson wrote:
>
> Hayashi Eisuke wrote:
> > 1000000: 4000000 (-1077752048)
> > 2092728: Segmentatioin error (core dumped)
>
> The process is dying because you are exceeding unix process stack space
> limits. You probably have an 8MB per process limit, and the number you
> are using is a tad less than 2MB.
>
> If you are using bash, see the documentation for the "ulimit" command.
> If csh, I think it is "limits".
> --
> Jim Wilson, GNU Tools Support, http://www.specifix.com