Closed Skptak closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
cf2366c
) 93.42% compared to head (921ea9a
) 93.42%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication
Description
Add a check for if the scheduler is running to xPortIsAuthorizedToAccessBuffer().
This fixes an issue where before the scheduler is started APIs can fail as the TCB pointed to by pxCurrentTCB may not have access to requested APIs.
Test Steps
Call xTimerStart(), which calls MPU_xTimerGenericCommandFromTask:
Which calls MPU_xTimerGenericCommandFromTaskEntry
This calls MPU_xTimerGenericCommandFromTaskImpl:
Which calls xPortIsAuthorizedToAccessBuffer This loads pxCurrentTCB to check if you are allowed to start the timer
However, there's no actual calling task that made this call. It just checks whatever TCB happens to be there.
A check is needed for when the scheduler is not running yet, as at this point the current TCB is irrelevant to the operation being performed.
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.