Possible Bug in BSD

chris at mimsy.UUCP chris at mimsy.UUCP
Thu Feb 26 15:08:32 AEST 1987


In article <4685 at brl-adm.ARPA> sefunix%sefe.decnet at nwc-143b.arpa
(SEFE::SEFUNIX) writes:
>... try this program on [your] system and see if [you] also get
>a segmentation violation on the fopen of argv[1] [and] if so, why?

>struct abc { short Red; short Green; short Blue; short Alpha; };

>main ...
>	FILE *f1, *fopen();
>	struct abc point[151][451];

Funny how these things come up in bursts.  See recent comp.lang.c
(Info-C digest) articles for details, but you have here 151*451*8
or 544808 bytes of stack.  This is larger than the default stacksize
resource limit, so the next stack access causes a segmentation
fault.  To fix it, raise your stacklimit, or move the data off
the stack.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	seismo!mimsy!chris	ARPA/CSNet:	chris at mimsy.umd.edu



More information about the Comp.unix.wizards mailing list