Skip to content

Conversation

@ALTracer
Copy link
Contributor

Detailed description

  • No new features, it's more of a fix.
  • The existing problem is unchecked malloc in regs_description.
  • This PR adds the check and logs on heap exhaustion.

Discovered during testing around July 14. Triggerable by PR1830 (stack front) plus no PR1529 (traceswoasync on heap) on stlink/swlink. (hits even harder with ENABLE_RTT=1). Otherwise the symptom on attach is rather cryptic, GDB gets no (or malformed) register description and defaults to wrong architecture and register numbers (use RSP logging).
May also be beneficial not just to ENABLE_DEBUG=1 builds, but also out-of-tree projects which have RTOS and log channels but a small heap for userspace tasks.

Your checklist for this pull request

Closing issues

@ALTracer ALTracer force-pushed the fix/cortex-desc-allocfail-report branch from 3886a7f to 00ae965 Compare August 18, 2024 11:38
@ALTracer ALTracer force-pushed the fix/cortex-desc-allocfail-report branch from 00ae965 to 30762f4 Compare September 1, 2024 14:36
@ALTracer ALTracer force-pushed the fix/cortex-desc-allocfail-report branch from 30762f4 to fc9fa7e Compare September 29, 2024 21:33
@ALTracer ALTracer force-pushed the fix/cortex-desc-allocfail-report branch from fc9fa7e to 62b0844 Compare December 30, 2024 11:34
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.

1 participant