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

Rewrite block sorting and placment so that unreachable blocks are processed. #1428

Merged
merged 2 commits into from
Apr 6, 2019

Conversation

karliss
Copy link
Member

@karliss karliss commented Apr 5, 2019

Change block processing order so that unreachable blocks and edges between them are also placed. Prevents unreachable blocks from being stacked in corner (#1419).

Also prevents some instances of same row edges, and upwards going edges that are not part of loop.

From the comments on top of some unreachable blocks it seems that there might be a bug in cutter code preparing input for GraphView, looks like r2 has identified those blocks as part of case switch/case statement.

Test plan (required)

Closing issues

Closes #1419

…cessed.

* Use DFS instead of Kahn's algorithm for toposort as it makes it easier
to deal with loops.
@xarkes
Copy link
Member

xarkes commented Apr 6, 2019

Can you show a screenshot of the new behaviour?

src/widgets/GraphGridLayout.cpp Outdated Show resolved Hide resolved
@karliss
Copy link
Member Author

karliss commented Apr 6, 2019

Example of case blocks without properly analyzed edges being placed the same as everything else instead of being stacked on top of each other.

Ekrānattēls no 2019-04-06 13-47-37

The input data preparation bug I mentioned in description seems to be on the r2 side as it showed the same case blocks without incoming edges.

Copy link
Member

@ITAYC0HEN ITAYC0HEN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good here :)

@ITAYC0HEN ITAYC0HEN merged commit 0583b06 into rizinorg:master Apr 6, 2019
@karliss karliss deleted the unreachable-place branch September 2, 2019 18:26
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.

None yet

3 participants