sds icon indicating copy to clipboard operation
sds copied to clipboard

sds and interrupts

Open k1mgy opened this issue 6 years ago • 0 comments

I've been investigating a nasty firmware crash that, until now, was a huge mystery.

While debugging some new code that uses SDS, I single stepped into sdscmp(). There, I noticed that one of the two variables was totally different than the ones being compared. And, when sdscmp() returned, the stack pointer was apparently ruined, as I was taken back to a process that a 1-second interrupt handler uses for sdscmp().

I suppose it's possible this is an artifact of my debugger (Atmel Studio 7).

However, if not, could there be a case where the sdscmp() function (or for that matter any sds function) cannot be called by two different processes, one of which is an interrupt service routine?

k1mgy avatar Jul 09 '19 17:07 k1mgy