mms@bnlux1.bnl.gov (Morris Strongson) (05/07/91)
The following complicated C program gives a
"Segmentation fault (core dumped)" message when compiled and run under the
cc compiler that comes with Ultrix 4.1 on our DECsystem 5000 (RISC). The
value for UIDMAX I really wanted was 65536, but all values starting with
64971 cause it to crash (64970 works). The original was much bigger, but
this boils the problem down to its essential parts. Moving the array above
main works as well.
-------------------------begin included prograsm-----------
#define UIDMAX 64971
main()
{
long x[UIDMAX][2]; /* 0 for total, 1 for file count */
printf("entering disksort\n");
}
-------------------------end included prograsm-----------
This seems to be a rather basic (poor choice of word) program, and I
find it rather distressing that something this simple would fail. Is
there a later version of the compiler available? Thanks.
Morris Strongson INTERNET: mms@bnlux1.bnl.gov
BITNET: mms@bnlux0.BITNET
--
Morris Strongson INTERNET: mms@bnlux0.bnl.gov
BITNET: mms@bnlux0.BITNET
UUCP: ...philabs!sbcs!bnlux0!mms
or bnlux0!mms@uunet.uu.net
treese@crl.dec.com (Win Treese) (05/07/91)
Try "unlimit stacksize". A segmentation fault doesn't really tell you this, but it does the job. The default stacksize in ULTRIX 4.1 is 512 kbytes. In ULTRIX 4.2, it seems to be 2048 kbytes. Win Treese Cambridge Research Lab treese@crl.dec.com Digital Equipment Corp.
bgh@synedm.synerlogic.ca (barry hannigan) (05/11/91)
check what /usr/bin/cc points to. under 4.0.1, the link is to the 2.1 compiler instead of 2.0 barry
yzarn@lhdsy1.chevron.com (Philip Yzarn de Louraille) (05/14/91)
In article <1991May10.220135.29244@synedm.synerlogic.ca> bgh@synedm.synerlogic.ca (barry hannigan) writes: >check what /usr/bin/cc points to. under 4.0.1, the link >is to the 2.1 compiler instead of 2.0 >barry Yipe! If you are set up to use version 2.0 mof the programming environment, it is *not enough* just to change that link! Be root and use /usr/bin/pgmrvers. It will scan /usr/lib/cmplrs (I think) and then ask you which version of the programming environment you want. Usually 2.0 or 2.1. Choose 2.1 and the script will change *all* the necessary links for you. -- Philip Yzarn de Louraille Internet: yzarn@chevron.com Research Support Division Unix & Open Systems Chevron Information & Technology Co. Tel: (213) 694-9232 P.O. Box 446, La Habra, CA 90633-0446 Fax: (213) 694-7709
robm@ataraxia.Berkeley.EDU (Rob McNicholas) (05/16/91)
In article <897@lhdsy1.chevron.com> yzarn@lhdsy1.chevron.com (Philip Yzarn de Louraille) writes: Path: agate!ucbvax!bloom-beacon!snorkelwacker.mit.edu!spool.mu.edu!uunet!lhdsy1!yzarn From: yzarn@lhdsy1.chevron.com (Philip Yzarn de Louraille) Newsgroups: comp.unix.ultrix Date: 14 May 91 15:26:27 GMT References: <1991May6.193136.9722@bnlux1.bnl.gov> <1991May10.220135.29244@synedm.synerlogic.ca> Organization: Chevron Oil Field Research, La Habra, CA. Lines: 17 In article <1991May10.220135.29244@synedm.synerlogic.ca> bgh@synedm.synerlogic.ca (barry hannigan) writes: >check what /usr/bin/cc points to. under 4.0.1, the link >is to the 2.1 compiler instead of 2.0 >barry Yipe! If you are set up to use version 2.0 mof the programming environment, it is *not enough* just to change that link! Be root and use /usr/bin/pgmrvers. It will scan /usr/lib/cmplrs (I think) and then ask you which version of the programming environment you want. Usually 2.0 or 2.1. Choose 2.1 and the script will change *all* the necessary links for you. -- Philip Yzarn de Louraille Internet: yzarn@chevron.com Research Support Division Unix & Open Systems Chevron Information & Technology Co. Tel: (213) 694-9232 P.O. Box 446, La Habra, CA 90633-0446 Fax: (213) 694-7709 Not quite all. I believe it misses /usr/lib/cpp (yes, this is a bug). -Rob -- Rob McNicholas Computer Systems Support Group, U.C. Berkeley robm@janus.berkeley.edu ....!ucbvax!janus!robm Home: 415/339-1514 Work: 415/642-8633