Finding Panics with Call Graph Analyzer
Web page · https://tweedegolf.nl/en/blog/242/finding-panics-with-call-graph-analyzer
First seen by Oriel on .
AI summary
Call Graph Analyzer (CGA) extracts callgraphs from monomorphized MIR to identify panic paths across Rust crates and dependencies, offering broad detection with configurable filtering but some false positives.
- CGA traverses reachable MIR from crate entrypoints, recording concrete generic instantiations while excluding unused functions and compile-time const computations.
- Running `cargo cga check` reports panic callsites with heuristic backtraces, including paths through dependencies, standard library code, and possible vtable resolutions.
- Callgraphs can be exported as JSON or GraphViz dot files, while whitelists suppress trusted paths and blacklists flag prohibited functions.
- CGA conservatively assumes all relevant vtable entries and created function pointers may execute, and async blocks contain implicit panic paths.
- As a version-specific nightly `rustc-driver`, CGA requires local installation, may differ from production compilation, and typically runs 2x-3x slower than `cargo check`.
#rust #static analysis #mir #call graphs
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Hacker News: 71, latest observation ; +67 over observed period since
- Lobsters: 19, latest observation ; +18 over observed period since
Comments
Comment count reported by the source.
- Hacker News: 3, latest observation ; +3 over observed period since
- Lobsters: 2, latest observation ; +2 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Hacker News | 50273504 | https://tweedegolf.nl/en/blog/242/finding-panics-with-call-graph-analyzer/ Read discussion |
| Lobsters | opqtiv | https://tweedegolf.nl/en/blog/242/finding-panics-with-call-graph-analyzer/ Read discussion |