Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!usenet.ins.cwru.edu!ljo From: ljo@r2d2.eeap.cwru.edu (L Jonas Olsson) Newsgroups: comp.os.386bsd.bugs Subject: Re: Gcc 2.3.3 bug ? Date: 6 Apr 1993 19:25:19 GMT Organization: Case Western Reserve Univ. Cleveland, Ohio (USA) Lines: 18 Message-ID: <1pslf0$so8@usenet.INS.CWRU.Edu> References: <1993Apr6.154454.22346@cm.cf.ac.uk> NNTP-Posting-Host: johnny5.eeap.cwru.edu In article <1993Apr6.154454.22346@cm.cf.ac.uk> paul@isl.cf.ac.uk (Paul) writes: >I was trying to port someone elses program to 386bsd but I kept getting >seg. violations which I finally tracked down to an array declaration. The problem is that 386BSD only gives you 512kB of stack as default. With higher stacksize limit the program runs OK. You get seg faults on Sparc also if you try setting the limit below the need, try: main(){char a[1024*1024]; a[1024*1000] = 10;} with "limit stack 512k" and "unlimit stack". It's a pretty bad behavior... Does this happen on all UNIX versions and look-alikes? Are there any tests to avoid it? Jonas Olsson ljo@po.cwru.edu