[comp.unix.xenix] Question about SCO Xenix and stack size

c184-bw@holden.Berkeley.EDU (Percy "Mr. Fun" Schwartz) (04/22/89)

I recently ported a program from an Altos 2086 running Altos Xenix 
3.4b to an 80286 based AT clone running SCO Xenix 2.2.1.
The program compiles and links O.K. but it dumps core at run time, 
giving the classic "Stack overflow - Bus error: core dumped" message.

Can somebody tell me how I can increase the stack size?  
What is the default stack size for the SCO (Microsoft?) compiler?
(I know I should RTFM but its in another office that I can't get to - 
no flames please):-).

BTW I am certain that its not the code since I have the program 
running on a variety of machines running UNIX, Xenix, and DOS and 
they all work fine.

Thanks in advance.

Percy
Internet:  c184-bw@holden.berkeley.edu
UUCP:	   ..!ucbvax!holden.berkeley.edu!c184-bw

jbayer@ispi.UUCP (Jonathan Bayer) (04/23/89)

In article <12743@pasteur.Berkeley.EDU> c184-bw@holden.Berkeley.EDU (Percy "Mr. Fun" Schwartz) writes:
}
}I recently ported a program from an Altos 2086 running Altos Xenix 
}3.4b to an 80286 based AT clone running SCO Xenix 2.2.1.
}The program compiles and links O.K. but it dumps core at run time, 
}giving the classic "Stack overflow - Bus error: core dumped" message.
}
}Can somebody tell me how I can increase the stack size?  
}What is the default stack size for the SCO (Microsoft?) compiler?
}(I know I should RTFM but its in another office that I can't get to - 
}no flames please):-).

When loading you can use the "-F" option to set the size of the stack. 
Otherwise you can use the "fixhdr" program to do the same thing.




JB
-- 
Jonathan Bayer			      Beware: The light at the end of the
Intelligent Software Products, Inc.	      tunnel may be an oncoming dragon
19 Virginia Ave.				...uunet!ispi!jbayer
Rockville Centre, NY 11570  (516) 766-2867    jbayer@ispi.UUCP

tony@joshua.math.ucla.edu (Tony Lei) (04/25/89)

In article <12743@pasteur.Berkeley.EDU> c184-bw@holden.Berkeley.EDU (Percy "Mr. Fun" Schwartz) writes:
>
>I recently ported a program from an Altos 2086 running Altos Xenix 
>3.4b to an 80286 based AT clone running SCO Xenix 2.2.1.
>The program compiles and links O.K. but it dumps core at run time, 
>giving the classic "Stack overflow - Bus error: core dumped" message.
>
>Can somebody tell me how I can increase the stack size?  
>What is the default stack size for the SCO (Microsoft?) compiler?
>(I know I should RTFM but its in another office that I can't get to - 
>no flames please):-).
>
>BTW I am certain that its not the code since I have the program 
>running on a variety of machines running UNIX, Xenix, and DOS and 
>they all work fine.
>
>Thanks in advance.
>
>Percy
>Internet:  c184-bw@holden.berkeley.edu
>UUCP:       ..!ucbvax!holden.berkeley.edu!c184-bw

Percy, Use the -F option to increase the sack size.
Now can somebody answer this question:

What do you do when the stack and the data exceeds 64K?

I'm also using SCO Xenix but I'm using INFORMIX ESQL/C along with it.
Because of this I don't really have much control over the space allocated
for data.

I'm getting the following error message 

        "bin/ld: stack and data exceeds 64K"

My applications program is pretty big and I started out using -F 8000 and 
since then I've gone down to -F 2000.

I'm still getting the above error during linking .

Any pointers would be greatly appreciated.



Tony Lei

INTERNET:	tony@math.ucla.edu
UUCP:		..!ucbvax!ucla-cs!math.ucla.edu!tony