Lewin, > Michael Pont wrote: > > The option -mapcs-stack-check is recognised. However, I've found > > various messages on the WWW to suggest that this option (although > > recognised and documented) has not been implemented for ARM. > > Just IMHO, it is not desirable to rely on runtime stack > checking in an > embedded application. What is the program supposed to do when a stack > overrun is detected? Hand the user a box of candy? Explode? If you're developing, what's the harm in having some extra diagnostics in your toolset? Modula-2 and Pascal had this for years, with the ability to turn stack checking off if you required it. For heaven's sake, our Modula-2 compilers even had stack checking in coroutines allowing you to stop and diagnose a problem when an interrupt comes in and an IOTRANSFER activates. The debugger was well integrated and didn't screw the stack up on stack overflow, so you can see where things went wrong. IMO, stack checking stops the headscratcher where you see variables overwritten for no reason. Or worse, the heap and the stack collide, causing delayed havoc. -- Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk CrossWorks for MSP430, ARM, and (soon) Atmel AVR processors
Message
RE: [lpc2100] Stack checking
2004-01-26 by Paul Curtis
Attachments
- No local attachments were found for this message.