[comp.unix.xenix] SCO XENIX/286 SYS V sh stack overflow

dick@slvblc.UUCP (Dick Flanagan) (12/17/89)

I am attempting to install the Elm mailer on SCO XENIX/286 SYS V 2.3.2
and the README file for Elm 2.5 states:

	The Configuration script has been known to exceed the default
	stack size in Unix 286 sh's.  If Configure does not run correctly
	on this type of machine increase the stack size and rerun it.

Well, that's exactly what happens on my 286.  My question is, just how do
I go about getting an sh with a bigger stack?!?  Is there a utility that
can be used to patch the object file?  Can I get one from SCO?  Just how
do I go about doing this wonderful thing?

Thanks for any and all help!

Dick

root@slvblc.UUCP (Super user) (12/18/89)

In my earlier article I had asked how to increase the size of /bin/sh, since
I had run out of stack space while running Elm's Configure script.  I got a
nice note from a gentleman at SCO who pointed me to the fixhdr program that
does exactly that.  Using fixhdr I created a /bin/bigsh with an 0x8000 stack
and now Elm's Configure script runs just fine!  Thanks, again, Sean!

Dick

rodeen@buddha.UUCP (Rick Odeen) (12/18/89)

In article <72@slvblc.UUCP> dick@slvblc.UUCP (Dick Flanagan) writes:
>I am attempting to install the Elm mailer on SCO XENIX/286 SYS V 2.3.2
>and the README file for Elm 2.5 states:
>
>	The Configuration script has been known to exceed the default
>	stack size in Unix 286 sh's.  If Configure does not run correctly
>	on this type of machine increase the stack size and rerun it.
>
>Well, that's exactly what happens on my 286.  My question is, just how do
>I go about getting an sh with a bigger stack?!?  Is there a utility that
>can be used to patch the object file?  Can I get one from SCO?  Just how
>do I go about doing this wonderful thing?

I think the README file distributed with version 2.2 PL14 suggests
saving a copy of sh to something, running fixhdr on sh:

	  fixhdr -F 8000 /bin/sh

running Configure, then putting your original sh back in place.

fixhdr -F increases your stack size to 8000 hex.



-- 
Rick Odeen                                    buddha!rodeen@umn-cs.cs.umn.edu
Nutrition Coordinating Center                           AT&T: +1 612 627 4884
University of Minnesota

phil@lgnp1.LS.COM (Phil Eschallier) (12/18/89)

In article <72@slvblc.UUCP> dick@slvblc.UUCP (Dick Flanagan) writes:
>I am attempting to install the Elm mailer on SCO XENIX/286 SYS V 2.3.2
>and the README file for Elm 2.5 states:
>
>	The Configuration script has been known to exceed the default
>	stack size in Unix 286 sh's.  If Configure does not run correctly
>	on this type of machine increase the stack size and rerun it.
>
>Well, that's exactly what happens on my 286.  My question is, just how do
>I go about getting an sh with a bigger stack?!?  Is there a utility that
>can be used to patch the object file?  Can I get one from SCO?  Just how
>do I go about doing this wonderful thing?
>

	this can be corrected in the Configure shell script.  i don't have
	the source handy right now but as i remember there is a line that
	processes the configure info -- the line is:
	". ./config.sh"  or something similar.  change the line to:
	"/bin/sh ./config.sh"

	this will solve the overflow problem.

	let me know if you cannot get this to work and i will pull up my
	source and send you the exact patch.

	phil eschallier
	phil@ls.com

fyl@ssc.UUCP (Phil Hughes) (12/22/89)

In article <3593@lgnp1.LS.COM>, phil@lgnp1.LS.COM (Phil Eschallier) writes:
> In article <72@slvblc.UUCP> dick@slvblc.UUCP (Dick Flanagan) writes:

> >Well, that's exactly what happens on my 286.  My question is, just how do
> >I go about getting an sh with a bigger stack?!?  Is there a utility that
> >can be used to patch the object file?  Can I get one from SCO?  Just how
> >do I go about doing this wonderful thing?

You can use the fixhdr command to change the stack size (among other
things).  According to page 18 of my handy-dandy SSC XENIX System V
Command Summary:
	fixhdr -F xxxx program_name

	where xxxx is the size of the stack in hex
(sure is nice to have 5,000 of these handy booklets within 50 feet :-) )

-- 
Phil Hughes, SSC, Inc. P.O. Box 55549, Seattle, WA 98155  (206)FOR-UNIX
     uunet!pilchuck!ssc!fyl or attmail!ssc!fyl            (206)527-3385