DPRG List  

[DPRG] 68HC11 stack problem resolved

Subject: [DPRG] 68HC11 stack problem resolved
From: Mike McCarty jmccarty at ssd.usa.alcatel.com
Date: Thu Jun 21 15:05:07 CDT 2001

On Thu, 21 Jun 2001, Dan Miner wrote:

> Another solution that I've used with great success is to fill unused stack
> space
> with a known constant (such as $55) and after your program has run, look
> at the enitre stack space to see the extent of clobbered constant bytes.
> This shows you the maximum space used.  It's not 100% perfect though
> because you COULD get an interrupt on top of the largest stack usage
> that may be a rare event.  But it is a good first approximation.
>                 - Dan Miner

I think nearly everyone has used that technique at some time. I usually
use $DEADBABE to fill memory, though!

It is more arduous though more reliable to trace through the code and
see how deeply one can go.

char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I don't speak for Alcatel      <- They make me say that.

More information about the DPRG mailing list