AVR - incorrect stack error checking
Original Reporter info from Mantis: ccrause @ccrause
-
Reporter name: Christo Crause
Original Reporter info from Mantis: ccrause @ccrause
- Reporter name: Christo Crause
Description:
Enabling stack error checking for a simple project results in spurious stack errors (runtime error 202). The attached demo works correctly without -Ct but fails on entry to the first call to recursiveSum (as can be seen by the stack pointer printed) with -Ct.
The user ErrorProc prints out the error code and stack pointer which indicates very little stack space is actually used when the stack error is generated.
Output of this case:
Err: 0x00CA
SP: 0x08D3
Steps to reproduce:
Compile RTL with -SfSTACKCHECK added to #ifdef CPUAVR in embedded/system.cfg.
Comppile attached simple.lpr:
ppcrossavr -Tembedded -Wpatmega328p -Ct -O3 -Mobjfpc simple.lpr
Mantis conversion info:
- Mantis ID: 35332
- Build: 41844
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 42157 (#2f501be2)
- Monitored by: » dioannidis (Dimitrios Chr. Ioannidis)
- Target version: 3.2.0