Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disasm: fix pltgottargets handling when no matches are found #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cimes-isi
Copy link

I ran into this problem on a Debian 10 (buster) system -- because of how Python's string split method works, an empty string was being passed to pltgotmapper when no matches were actually found. Obviously this caused problems when trying to split the line and index inside the function.

It's possible the same problem may exist elsewhere, e.g., right above when mapping into the pltsymmapper function. You might consider also fixing these potential problems.

Thanks.

If you specify sep when splitting a string but the sep value isn't found,
you get a list with a single entry that is an empty string.
More generally, consecutive delimiters aren't grouped together and are
deemed to delimit empty strings.
An empty string is an invalid argument for the pltgotmapper function, so
filter them out.
@cimes-isi
Copy link
Author

I'd also like to use this opportunity to ask if gcc-4.8 is really needed (as set in config.py). It doesn't appear to be needed just to recompile the diversified binary, but perhaps another tool later in the evaluation pipeline is dependent on how gcc-4.8 produces binaries?

@wwkenwong
Copy link
Owner

Thanks for your PR. I think gcc-4.8 isn't really needed for recompile the diversified binaries. But you may encounter some undefined behaviors due to changes in the compiler.

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.

2 participants