[comp.sys.amiga] LAttice 5.0.4 Stack Problem

maniac@arrakis.nevada.edu (ERIC SCHWERTFEGER) (01/06/90)

Does anyone have any experience with Lattice 5.0.4 programs giving faulty
stack overflow requesters?  It does this quite often with me, and I'm using
the default compiling options.

It usually happens only after I compile, and often saving the program
and rebooting fixes the problem.  I do not think it is a memory fragmentation
problem, as I can trace through the program with CodeProbe with no requester.

Any Ideas?




Eric J. Schwertfeger, UNLV  maniac@arrakis.nevada.edu

walker@sas.UUCP (Doug Walker) (01/08/90)

In article <1159@unsvax.NEVADA.EDU> maniac@arrakis.nevada.edu.uucp (ERIC SCHWERTFEGER) writes:
>Does anyone have any experience with Lattice 5.0.4 programs giving faulty
>stack overflow requesters?  It does this quite often with me, and I'm using
>the default compiling options.

>Eric J. Schwertfeger, UNLV  maniac@arrakis.nevada.edu

We haven't heard of anything like this.  Are you SURE it's a faulty requester?
Can you send some source in that reproduces the problem?  Try upping your stack
and see how high it needs to go before the requester stops appearing.  If you
have automatic arrays declared, try allocating them dynamically instead.


  *****
=*|_o_o|\\=====Doug Walker, Software Distiller=======================
 *|. o.| ||
  | o  |//     "READY!   FIRE!   AIM!   (Software under development!)
  ======
usenet: ...mcnc!rti!sas!walker   plink: dwalker  bix: djwalker 

martin@enuxha.eas.asu.edu (Ross D. Martin) (01/09/90)

In article <1426@sas.UUCP>, walker@sas.UUCP (Doug Walker) writes:
> In article <1159@unsvax.NEVADA.EDU> maniac@arrakis.nevada.edu.uucp (ERIC SCHWERTFEGER) writes:
> >Does anyone have any experience with Lattice 5.0.4 programs giving faulty
> >stack overflow requesters?  It does this quite often with me, and I'm using
> >the default compiling options.
> 
> >Eric J. Schwertfeger, UNLV  maniac@arrakis.nevada.edu
> 
> We haven't heard of anything like this.  Are you SURE it's a faulty requester?
> Can you send some source in that reproduces the problem?  Try upping your stack
> and see how high it needs to go before the requester stops appearing.  If you
> have automatic arrays declared, try allocating them dynamically instead.
>   *****
> =*|_o_o|\\=====Doug Walker, Software Distiller=======================

I have also noticed this problem with faulty stack requesters.  It does not
always happen, and it never happens from a shell that was just opened.  It
seems that there is something funny about the way Lattice checks the stack.
I have taken to always compiling with the -v option.

I have also found a bug in _CXV25.  It was pretty simple, so I was able to
fix mine myself.  There are some pushes to stack that were left out, so when
the corresponding pops occur followed by an rts, you're in guru city.  I 
assume this bug was known.

Speaking of which, what is the phone # of Lattice BBS?  I seem to have
misplaced it.  Can anyone give a list of patches currently available for 5.04?

		Ross Martin
		martin@enuxha.eas.asu.edu

walker@sas.UUCP (Doug Walker) (01/09/90)

In article <434@enuxha.eas.asu.edu> martin@enuxha.eas.asu.edu (Ross D. Martin) writes:
>In article <1426@sas.UUCP>, walker@sas.UUCP (Doug Walker) writes:
>I have also noticed this problem with faulty stack requesters.  It does not
>always happen, and it never happens from a shell that was just opened.  It
>seems that there is something funny about the way Lattice checks the stack.
>I have taken to always compiling with the -v option.
>		martin@enuxha.eas.asu.edu

>Speaking of which, what is the phone # of Lattice BBS?  I seem to have
>misplaced it.  Can anyone give a list of patches currently available for 5.04?
>
>		Ross Martin
>		martin@enuxha.eas.asu.edu

From what I can figure out, this problem seems to be in the ARP shell.
We use the standard, Commodore-defined methodology for determining the size
of the stack (See RKM vol 1), and ARP does not always follow the rules when
allocating stacks.  We were not aware of this problem until a few days ago.  
I recommend using another shell, or alternatively compiling with -v to suppress
stack-checking.

The stack-checking code works perfectly with CLI, Commodore's Shell and
WShell.  These are all the shells I have had experience with.

  *****
=*|_o_o|\\=====Doug Walker, Software Distiller=======================
 *|. o.| ||
  | o  |//     Apologies to all those who send me mail, about 80%
  ======       of mail replies bounce...
usenet: ...mcnc!rti!sas!walker   plink: dwalker  bix: djwalker