Repository navigation
PE: Load exception tables without pefile. - #886
Merged
Merged
Conversation
pefile decodes every UNWIND_INFO in the exception directory, while the backend only needs each entry's begin and end address. On OUTLOOK.EXE (119,599 entries) that parse took 5.3-5.8 s; reading the table directly takes 0.02 s. The reader keeps pefile's behavior: AMD64 only, stop at the first unsupported UNWIND_INFO version, and no entries if an UNWIND_INFO header is unreadable.
pefile only parses x64 exception directories, so ARM64 and ARMNT binaries got no function hints from .pdata. Read their 8-byte entries directly: the function length comes from the packed unwind data or the .xdata header (in 4-byte units on ARM64, 2-byte units on ARMNT), and ARMNT start addresses keep the Thumb bit. As on AMD64, every entry is kept (fragments included), reading stops at a reserved flag or an unsupported .xdata version, and an unreadable .xdata header drops the table. The hints match llvm-readobj --unwind on every entry of the new test binaries pdata_arm64.exe and pdata_armnt.exe.
Member
|
Corpus decompilation diffs can be found at angr/dec-snapshots@master...angr/cle_886 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.