JDEIFIK@isi.edu (Jeff Deifik) (04/25/89)
When I compile the following program with gcc, and run it it, I get
Segmentation fault (core dumped)
When I change the 250000 to 125000, the program runs correctly.
Throwing the 'L' after the number makes no difference.
Version: gcc 1.34
OS: Ultrix 2.0-1, also 4.3bsd
Machine: Vax 11/750
Command line: gcc -Wall -O -g a.c
tm.h: tm-vax.h
md: vax.md
Source:
#include <stdio.h>
int main(argc,argv)
int argc;
char *argv[];
{
int a[250000L];
printf("Hello World\n");
}
Jeff Deifik jdeifik@isi.edu
-------
rang@cpsin3.cps.msu.edu (Anton Rang) (04/25/89)
In article <VAX-MM(187)+TOPSLIB(118).24-Apr-89.17:31:04.ISI.EDU> JDEIFIK@isi.edu (Jeff Deifik) writes: When I compile the following program with gcc, and run it it, I get Segmentation fault (core dumped) [ ... ] int a[250000L]; printf("Hello World\n"); [ ... ] What is your stack limit set to? This would allocate 1 MB of stack space; at least on our system, the default stack limit is 512KB. (Use the csh 'limit' command to check it out.) +---------------------------+------------------------+---------------------+ | Anton Rang (grad student) | "VMS Forever!" | rec.music.newage is | | Michigan State University | rang@cpswh.cps.msu.edu | under discussion... | +---------------------------+------------------------+---------------------+