You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
line 668: file_entry = lineprog.header["file_entry"][line.state.file - 1]
should be a "- 0" when processing DWARF v5. (In the example I was looking at, the index became -1, which wrapped around to the last entry, giving a wrong filename.)
Description
I think I've found a bug in (edit 1/20/25:
pyelftools/examples/dwarf_decode_address.py) https://github.com/angr/cle/blob/master/cle/backends/elf/elf.py that leads to wrong filenames retrievals from DWARF v5 data.I believe the "- 1" here:
line 668: file_entry = lineprog.header["file_entry"][line.state.file - 1]
should be a "- 0" when processing DWARF v5. (In the example I was looking at, the index became -1, which wrapped around to the last entry, giving a wrong filename.)
cle uses pyelftools. Here's an example directly from the pyelftools repo that gives me the answer I expect: https://github.com/eliben/pyelftools/blob/main/examples/dwarf_decode_address.py
From that example, here's the difference in logic from the cle implementation:
Steps to reproduce the bug
No response
Environment
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: