Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!gatech!asuvax!ennews!mcdphx!udc!avonruff From: avonruff@urbana.mcd.mot.com (Al Von Ruff) Subject: Re: [386BSD] Stack overflow Message-ID: <1993Mar8.153748.23739@urbana.mcd.mot.com> Sender: news@urbana.mcd.mot.com (News) Nntp-Posting-Host: predator.urbana.mcd.mot.com Organization: Motorola Computer Group, Urbana Design Center References: <18593@hq.hq.af.mil> Date: Mon, 8 Mar 1993 15:37:48 GMT Lines: 35 In article <18593@hq.hq.af.mil> rick@hq.af.mil writes: >I recently pulled aegis 1.3 down off of the net and have been >trying to get it to port to 386BSD. I have however run into a >problem. When I try to make the distribution I get a stack overflow. > > >cc -O -Ifmtgen -Icommon -c fmtgen/lex.c >fmtgen/lex.c: In function parse_lex: >fmtgen/lex.c:300: yacc stack overflow before `case' >*** Error code 1 > >I dug around a bit and have been trying to figure out how to increase >the stack size, and have no idea how this is done. Upon searching through >the configuration files used to build the kernel I found a USRSTACK >constant. I found that it is declared in /sys/compile/MACHINE/assym.s >after a config, but the value left me clueless. I had intended on trying >to increase it and rebuild the kernel. This problem isn't related to the user stack size; this is an overflow of the 'yys' internal yacc stack in the c compiler. When yacc created the y.tab.c, the depth of this array was set to YYMAXDEPTH. The default value is 150. If the c compiler is presented with a source file which requires more than 150 states, then you will encounter this error. The string "yacc stack overflow" is printed out by the yacc parser (see /usr/lib/yaccpar). Since the error occurred during 'cc', you have two options: 1) Recompile cc with a larger value for YYMAXDEPTH. 2) Reorganize the code in fmtgen/lex.c so that it uses fewer states. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Al von Ruff Motorola Microcomputer Division, Urbana Design Center Voice: 217.384.8553 1101 East University Avenue, Urbana, IL 61801 USA Internet: avonruff@urbana.mcd.mot.com UUCPnet: uiucuxc!udc!avonruff