I've been bitten in the ass a few times where I would write to an array out of scope. I have been working on a particular firmware for over 2 years and suspect an overflow which by now is close to impossible to find - for example:
uint8_t example[50];
uint8_t example2[100];
for(uint8_t i = 0; i < sizeof(example2); i++)
example[i] = i;
I understand that the above code example is primitive. It's only an example of what I am trying to describe.
Is there a package or function available that can detect these "leaks"?