This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Memory corruption in mov R4, 0; add R1, SP, #16; STB R4,[R1,#-1]! on Cortex-A9 with cache enabled, many interrupts EMAC, Timers after hours run. Not seeing in errata. R1 is not decremented and results corrupted stack data abort. Debugger not factor.

Memory corruption in mov R4, 0;  add R1, SP, #16;   STB R4,[R1,#-1]! on Cortex-A9 with cache enabled, many interrupts EMAC, Timers after hours run.  Not seeing in errata.  R1 is not decremented and results corrupted stack data abort. Debugger not factor.

I do not see anything like this in the errata for the Cortex-A9.  This is a Zynq Z7020 running 666Mhz with dual cores and both levels of cache running.  The compiler is GCC but the fact that this runs for many hours with this code hit millions of times makes me worried.   The value at R0 is the top of the local stack frame and the final byte is a byte placed on the stack with the address taken at say 0x12345F but since it is not decremented it points to a register value pushed onto the stack at 0x123460 and the method call then writes the byte data back to the stored register value at 0x1234560 and corrupts it causing a data abort.  Nothing else is corrupted just that one byte.