Page 1 of 1

SB-26: Salvo: Updated AVR Context Switcher

PostPosted: Fri Dec 17, 2004 1:25 am
by Salvo Tech Support
Applies To

All Salvo for AVR distributions.

Description of Problem

An error in the Salvo context switcher for all memory models with 16-bit stack pointers (SP) leaves open the possibility of stack and/or memory corruption.

The error will occur ONLY if an interrupt occurs during a very narrow window (just a single instruction, in up to two different Salvo functions) during a Salvo context switch, AND the actions inside the Salvo context switcher will result in a carry operation from the low byte to the high bytes of the SP.

Typical AVR Stack pointer initialization, coupled with the fact that Salvo tasks run just below main() in an application's call tree, mean that this run-time error is extremely unlikely, and would only occur in tasks that have a very large number of auto variables, and/or in applications with large (>250 byte) stack usage.

Suggested Workaround

Patches have been issued for all Salvo distributions. Users should replace Salvo libraries (Lite, tiny, SE, LE and Pro) and source code (Pro) with the newer versions in the patches.

Fixed In

Salvo for AVR v3.2.4-c.

Salvo Technical Support
Please request all tech support through the Forums.