Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!seismo!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.unix.wizards Subject: Re: Possible Bug in BSD Message-ID: <5596@mimsy.UUCP> Date: Thu, 26-Feb-87 00:08:32 EST Article-I.D.: mimsy.5596 Posted: Thu Feb 26 00:08:32 1987 Date-Received: Sat, 28-Feb-87 00:37:11 EST References: <4685@brl-adm.ARPA> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 20 Summary: Not a bug; consider your stack size In article <4685@brl-adm.ARPA> sefunix%sefe.decnet@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@mimsy.umd.edu