Let Your CI Catch Your Stack Overflows, Before They Hit...
summary
Reimplementation of stack-usage analysis parses ELF and DWARF plus GCC call‑graph and uses Capstone to count stack‑changing instructions, then builds per-thread worst‑case call paths and reports stack and flash deltas as CI comments (GitLab/GitHub) per board and build. Demo runs on ARM, detects static threads via K_THREAD_DEFINE and inspects device structs to resolve function pointers, but it flags unresolved dynamic calls and notes compiler limits to accuracy. Output aims to fail CI on overflows and show exact symbols that changed.
AI-written summary · about
chapters (13)
- 0:00Introduction and motivation
- 1:47Stack usage analysis demo
- 3:11CI integration with GitLab
- 4:57Multi-board stack comparison
- 6:22Tool limitations and alternatives
- 8:28GCC options for stack analysis
- 10:32Call graph extraction challenges
- 12:38Web-based stack analysis demo
- 15:51Configuration and dynamic calls
- 16:11Testing across firmware types
- 18:18Future improvements and ideas
- 20:48Community and maintenance
- 21:09Q&A session
