Skip to content

segfault-analyzer: init version.#43

Merged
saimizi merged 4 commits intomainfrom
feature/add-segfault-analyzer
Oct 12, 2025
Merged

segfault-analyzer: init version.#43
saimizi merged 4 commits intomainfrom
feature/add-segfault-analyzer

Conversation

@saimizi
Copy link
Owner

@saimizi saimizi commented Oct 12, 2025

What's changed

Add a new tool segfault-analyzer for segmentation fault analysis.

Fixes #44

`fault_info` is conflict with the definition in vmlinux.h in arm64.
- Fix struct name collision: rename 'fault_info' to 'segfault_fault_info'
  to avoid conflict with kernel's fault_info struct in ARM64 vmlinux.h
- Add VMA-based fallback symbol resolution for when processes exit
  before symbol resolution completes
- Enhance both ConsoleProcessor and JsonProcessor with fallback methods
- Provide meaningful binary+offset info even when /proc/<pid>/maps unavailable
- Resolves CI compilation failure on ARM64 architecture
- Apply calculate_file_offset() to both resolve_address() and resolve_with_vma()
- Convert VMA-based offsets from ExecMap::symbol() to proper file offsets
- Ensures consistent, accurate offsets that match objdump/addr2line output
- Affects both ConsoleProcessor and JsonProcessor symbol resolution
- Extract filenames for cleaner output formatting

Fixes issue where resolve_address() was using raw VMA offsets while
resolve_with_vma() was correctly applying file offset calculation.
@saimizi saimizi merged commit c019800 into main Oct 12, 2025
3 checks passed
@saimizi saimizi deleted the feature/add-segfault-analyzer branch October 12, 2025 11:00
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.

segfault_analyzer shows VMA offset instead of ELF text base offset

1 participant