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

Enable generation of inter-procedual control flow graph. #4001

Merged
merged 6 commits into from
Dec 14, 2023

Conversation

Rot127
Copy link
Member

@Rot127 Rot127 commented Nov 24, 2023

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

Requires: rizinorg/rizin-testbins#134

Adds the ability to generate a inter-procedual control flow graph.

One thing to discuss before merge:

The graph uses RzGraphNodeInfo instead of a simple RzGraphNode. This wastes space (at least the two char * members) because iCFGs will get enormous.

But if the graph is supposed to be returned by rz_core_graph it is basically forced to use it. Using only the node prevents printing it. Which would only be annoying for testing.

Test plan

Test added

Closing issues

None

@wargio
Copy link
Member

wargio commented Nov 25, 2023

@Rot127 is missing the changes on the YAML file.

librz/util/graph.c Outdated Show resolved Hide resolved
@Rot127 Rot127 force-pushed the iCFG branch 2 times, most recently from 0f89ede to 0caf119 Compare December 3, 2023 00:23
XVilka

This comment was marked as resolved.

@XVilka

This comment was marked as resolved.

@XVilka XVilka requested a review from wargio December 3, 2023 05:54
@XVilka
Copy link
Member

XVilka commented Dec 3, 2023

Regarding this:

The graph uses RzGraphNodeInfo instead of a simple RzGraphNode. This wastes space (at least the two char * members) because iCFGs will get enormous.

But if the graph is supposed to be returned by rz_core_graph it is basically forced to use it. Using only the node prevents printing it. Which would only be annoying for testing.

Our graph API is in very poor shape, to be honest. We should have better graph data structures, just plain graphs and "enriched" with metainformation that is ready for printing: #992 (see also #397)

@XVilka XVilka merged commit c0abdb8 into rizinorg:dev Dec 14, 2023
44 checks passed
@Rot127 Rot127 deleted the iCFG branch December 14, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants