fix: unwinding for binaries compiled without eh_frame_hdr#393
Conversation
e43227c to
47c6606
Compare
Merging this PR will not alter performance
|
47c6606 to
3987253
Compare
Greptile SummaryThis PR introduces
Confidence Score: 5/5Safe to merge. The change is additive: a required binary field becomes optional, V3 artifacts are automatically upgraded on read, and all existing call sites are updated. The version migration path is correct and tested end-to-end. V3 artifacts are upgraded via From wrapping fields in Some, all snapshot tests are regenerated, and a new integration test against a real Valgrind binary validates the None path. No logic breakage is apparent. No files require special attention. Important Files Changed
|
Add UnwindDataV4 where eh_frame_hdr and eh_frame_hdr_svma are optional. The hdr is only a binary-search index into .eh_frame: binaries linked without `ld --eh-frame-hdr` (e.g. Valgrind's statically-linked tools) don't carry it, but can still be unwound since the parser rebuilds the index from .eh_frame. V3 data is transparently upgraded to V4 on parse, following the existing V1->V2->V3 compat pattern. This must land in perf-parser before runners start emitting V4.
unwind_data_from_elf bailed when .eh_frame_hdr was absent, leaving modules like Valgrind's statically-linked tools without any unwind data. Samples passing through their code could not be unwound, producing broken stacks in the flamegraph. Only require .eh_frame and emit the hdr fields as None when the section is missing.
3987253 to
41f4db9
Compare
No description provided.