Skip to content

fix(core): handle stack overflow on stm32f4 properly#6839

Merged
cepetr merged 1 commit into
mainfrom
cepetr/so-rsod-fix
Apr 28, 2026
Merged

fix(core): handle stack overflow on stm32f4 properly#6839
cepetr merged 1 commit into
mainfrom
cepetr/so-rsod-fix

Conversation

@cepetr

@cepetr cepetr commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

This PR fixes incorrect stack overflow handling on STM32F4 models. Instead of reporting SO (stack overflow), the RSOD shows HF (hard fault).

We still show SO @ 0x00000000, because the return address cannot be resolved.

[no changelog]

Co-authored-by: Copilot <copilot@github.com>
@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description is minimal and lacks required template sections for core developer PRs, including project assignment, priority, team, sprint, and development status information. Add required sections from the template: assign yourself, add to Firmware project with Priority/Team/Sprint, and set development status (e.g., 'In Progress' for draft PRs, 'Needs Review' for final PRs).
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing stack overflow handling on STM32F4 by inverting control flow in MemManage_Handler.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cepetr/so-rsod-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cepetr cepetr added this to Firmware Apr 27, 2026
@github-project-automation github-project-automation Bot moved this to 🔎 Needs review in Firmware Apr 27, 2026
@github-actions

Copy link
Copy Markdown

en main(all)

model device_test click_test persistence_test
T2T1 test(all) main(all) test(all) main(all) test(all) main(all)
T3B1 test(all) main(all) test(all) main(all) test(all) main(all)
T3T1 test(all) main(all) test(all) main(all) test(all) main(all)
T3W1 test(all) main(all) test(all) main(all) test(all) main(all)

Latest CI run: 24999470436

@cepetr cepetr marked this pull request as ready for review April 27, 2026 14:25
@cepetr cepetr requested a review from TychoVrahe as a code owner April 27, 2026 14:25
@cepetr cepetr merged commit 32fa8e1 into main Apr 28, 2026
108 checks passed
@cepetr cepetr deleted the cepetr/so-rsod-fix branch April 28, 2026 07:04
@trezor-bot trezor-bot Bot moved this from 🔎 Needs review to 🤝 Needs QA in Firmware Apr 28, 2026
@Thalarion Thalarion moved this from 🤝 Needs QA to ✅ Done (no QA) in Firmware Apr 29, 2026
@romanz romanz linked an issue May 6, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Reproducible RSOD when updating Trezor T from older firmware

3 participants