Additional fixes for array access panics in esp-ieee802154 #1923
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
cargo xtask fmt-packages
command to ensure that all changed code is formatted correctly.CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Adds additional array access checks to avoid panics in various frame processing methods.
Description
Adds some additional checks as a follow on to #1862, to resolve various array-access related panics I have seen (although worth noting these are very rare). Similar to #1862 I view these as just band-aids, I still need to dig in to determine root cause. But adding these checks will help with fault tolerance / recoverability either way. Also fixes an off-by-one error introduced in fix from #1862
Testing
Have confirmed it builds and runs as expected using the
esp-openthread
crate's example binary, on both esp32-h2 and esp32-c6 targets. Currently running some longevity tests as these only seem to pop up after many days/weeks of continuous operation, so will follow up with any needed additions once longevity tests complete.