Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/19/04 16:53
Read: times


 
#62897 - RE: Keil software - stack question
Responding to: ???'s previous message
Peter Dannegger said:
So the better place to test the stack was a timer interrupt, which test, if SP is always above STACK_START+1.

Overflow checks are more common than underflow checks, but to check for both in an extended variation of the timer interrupt approach, one could bracket the stack space with some guard bytes initialized to some known value. In the timer (or other) ISR, one would check to verify that the guard bytes above and below the stack space had not been corrupted. If they are corrupted, this would indicate an overflow or underflow.

I generally do not worry about stack overflow or underflow, having dealt with these issues as a matter of design. These conditions could still occur, however, as a result of the processor having experienced some pertubation. I could imagine stack checking being a requirement for some safety-critical designs, though I've not been exposed to these types of designs to be able to speak with any authority on the subject.


List of 11 messages in thread
TopicAuthorDate
Keil software - stack question            01/01/70 00:00      
   RE: Keil software - stack question            01/01/70 00:00      
      RE: Keil software - stack question            01/01/70 00:00      
         RE: Keil software - stack question            01/01/70 00:00      
         RE: Keil software - stack question            01/01/70 00:00      
            RE: stack pertubation            01/01/70 00:00      
   RE: To Dan Henry - stack question            01/01/70 00:00      
      RE: To Dan Henry - stack question            01/01/70 00:00      
         RE: To Dan Henry - stack question            01/01/70 00:00      
      RE: To Dan Henry - stack question            01/01/70 00:00      
   RE: Keil software - stack question            01/01/70 00:00      

Back to Subject List