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

Avoid creating of several long lists in ROP.__init__ #31

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

nirizr
Copy link
Contributor

@nirizr nirizr commented Aug 30, 2020

ROP.__init__ currently takes a while (several minutes) on large binaries, mostly due to how optimization attempts generate several long lists for size measurements of addresses_to_check().
I've added a function that behaves similarly to addresses_to_check() but avoids creating the list.

P.S.
I didn't test this final PR so it could be buggy, but I'll definitely run some tests if the rationale behind it is accepted by maintainers.

`ROP.__init__` currently takes a while (several minutes) on large binaries, mostly due to how optimization attempts generate several long lists for size measurements of `addresses_to_check()`.
I've added a function that behaves similarly to `addresses_to_check()` but instead of creating the list and then counting it the function increments
@ltfish
Copy link
Member

ltfish commented Aug 30, 2020

This optimization makes sense to me.

@rhelmot
Copy link
Member

rhelmot commented Aug 31, 2020

Yeah, it looks good to me too.

@salls
Copy link
Member

salls commented Aug 31, 2020

I agree. Thanks for the optimization!

@salls salls merged commit 93d4a35 into angr:master Aug 31, 2020
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.

4 participants