Skip to content

Conversation

@smagill
Copy link
Owner

@smagill smagill commented Feb 26, 2019

Mirror of aws amazon-freertos#340

Fix: PIC24_dsPIC/port.c used deprecated definition
Description

In lib/FreeRTOS/portable/MPLAB/PIC24_dsPIC/port.c deprecated definition MPLAB_DSPIC_PORT was used to determine if extra dsPIC specific registers values should be present in xInitialStack array but portRESTORE_CONTEXT() macro used another condition to determine what registers should be poped from stack which caused wrong number of register actually poped from stack. At this point, after
returning from function which called portRESTORE_CONTEXT() wrong program counter was restored and program behavior become unpredictable.

MPLAB_DSPIC_PORT was changed to condition used for deciding what portRESTORE_CONTEXT() macro definition should be used. Also comment line after corresponding #endifs was updated

Checklist:

  • I have tested my changes. No regression in existing tests.
  • My code is Linted.

@sonatype-lift
Copy link

sonatype-lift bot commented Feb 26, 2019

Muse Analysis Complete

Analysis tools: [ ] run on commits [ fe2a693 .. a79a2bd ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants