Xref: utzoo comp.unix.xenix:7240 comp.mail.elm:1809 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!wuarchive!texbell!vector!chip From: chip@vector.Dallas.TX.US (Chip Rosenthal) Newsgroups: comp.unix.xenix,comp.mail.elm Subject: Re: CNEWS2 and ELM2.2 PL10 Keywords: Stack Overflow core dump Message-ID: <693@vector.Dallas.TX.US> Date: 22 Aug 89 01:46:25 GMT References: <931@jack.UUCP> Reply-To: chip@vector.Dallas.TX.US (Chip Rosenthal) Followup-To: comp.unix.xenix Organization: Dallas Semiconductor Lines: 29 In article <931@jack.UUCP> steve@jack.UUCP (J. Steven Harrison) writes: > Here's the problem on cnews2 the build program returns a Stack Overflow >and then core dumps. The same situation occurs when trying to run the >Configure program in ELM2.2 PL10. As usual and of course when SCO is asked >about a bug in sh or shV they have no comment. I find that hard to believe. Anybody at SCO who has worked tech support for more than 6 hours must know what this problem means. Sh isn't broke, it's just your cpu is brain dead. 286 executables run with a fixed stack space. This stack is allocated when the executable image is loaded. The program specifies the size of the desired stack in the x.out header extension. If you do a "hdr" on an executable file, you will see that a "stack size" is specified. OK...program dies because the stack overflows? How do you fix it? Increase the stack size! (amazing...) The "fixhdr" command can poke the various values in the x.out header, including the amount of stack which must be allocated. RTFM. At first thought, it might seem ugly that you need to go in and patch vendor distributed executables this way. Not especially. The problem with fixed limits is sometimes you exceed them. Back in the bad old days when "vector" was an AT, I bumped into the stack limit a couple of times. Making the stack a wee bit larger always fixed this problem. -- Chip Rosenthal / chip@vector.Dallas.TX.US / Dallas Semiconductor / 214-450-5337 "I wish you'd put that starvation box down and go to bed" - Albert Collins' Mom