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

Repeated calculation of angr CFGFasr leads to low running efficiency and high memory consumption when there are too many function #74

Open
xzjpgithub opened this issue Oct 12, 2023 · 0 comments

Comments

@xzjpgithub
Copy link

in AngrAnalysis.init()
self.cfg = self.target.analyses.CFG(
resolve_indirect_jumps=True,
cross_references=True,
force_complete_scan=False,
normalize=True,
symbols=True,
)

the edges of functions is already in self.cfg
the way to get edges of function are followings

for func in self.cfg.functions.values():
print(func.addr, len(func.transition_graph.edges))

so I think the code of function get_cyclomatic_complexity(),

cfg = self.target.analyses.CFGFast(
force_complete_scan=False, start_at_entry=hex(func.addr)
)

This code uses CFGFast to recalculate edges for each function.
Leading to low running efficiency and high memory consumption when there are too many function.

Can we optimize this :)

                                                                                                                                                                                Best regards
                                                                                                                                                                                       XZJ 
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

No branches or pull requests

1 participant