Skip to content

ELF: fix DWARF 5 source file lookups - #879

Merged
rhelmot merged 2 commits into
angr:masterfrom
raaller:fix/dwarf5-line-filenames-548
Nov 14, 2026
Merged

rhelmot merged 2 commits into
angr:masterfrom
raaller:fix/dwarf5-line-filenames-548

Conversation

@raaller

@raaller raaller commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Fix file and directory lookups in DWARF 5 line tables, which use zero-based indices. Preserve legacy indexing and the implicit compilation directory for older versions.

Added regression coverage for DWARF 4/5 and relative/absolute directories.

Closes #548

@rhelmot

rhelmot commented Nov 5, 2026

Copy link
Copy Markdown
Member

CLE is enough of an end-to-end system that I would strongly prefer we test against real binaries rather than mocks. Can you either synthesize the subject of your testcase into an actual ELF or find an in-the-wild redistributable ELF and commit it to angr/binaries?

@raaller

raaller commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

hi, i've opened angr/binaries#276 with three synthetic ELF fixtures, assembly sources, and a rebuild script. They cover DWARF 4 and DWARF 5 filename indexing with relative and absolute directories, check on this pls

@ltfish ltfish self-assigned this Nov 11, 2026
@ltfish ltfish added the bug label Nov 11, 2026
@ltfish

ltfish commented Nov 11, 2026

Copy link
Copy Markdown
Member

Please update your test cases to use the real binaries before I can hit merge!

@raaller

raaller commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

updated

@rhelmot

rhelmot commented Nov 12, 2026

Copy link
Copy Markdown
Member

can you rebase your branch, CI is mad about the devel version pins

@raaller

raaller commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

done

@rhelmot

rhelmot commented Nov 13, 2026

Copy link
Copy Markdown
Member

This does not seem to be correctly rebased. pyproject.toml still lists archinfo==10.0.7 on your branch, while cle master lists archinfo==10.0.8.

We're working on making it so that this will be less stupid in the future, but in the meantime can you try again?

@raaller
raaller force-pushed the fix/dwarf5-line-filenames-548 branch from 8e9038f to 883cdf0 Compare November 14, 2026 10:16
@raaller

raaller commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

now should be good

@rhelmot
rhelmot merged commit ea4eae9 into angr:master Nov 14, 2026
20 checks passed
@rhelmot

rhelmot commented Nov 14, 2026

Copy link
Copy Markdown
Member

thanks for sticking with it 😵‍💫 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong lookups for DWARF v5 filename

3 participants