Skip to content

[4.0] SimplifyCFG: fix hang caused by infinite loop in CFG #11654

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

Merged

Conversation

eeckstein
Copy link
Contributor

Explanation: This fixes a compiler hang. It can happen for control flows which contain branches to non-single-cycle empty infinite loops.

Scope of Issue: This can only happen if the source already contains an infinite loop. But as I have seen before, such situations can implicitly occur if the source contains an assert which is optimized away in the optimized build.

Risk: Low. The change just adds an additional bail-out condition which checks for infinite loops in the CFG.

Reviewed By: Roman

Testing: There is a regression test for it

Jira/Radar: SR-5764, rdar://problem/34068905

fixes SR-5764, rdar://problem/34068905
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 67c31bc into swiftlang:swift-4.0-branch Aug 28, 2017
@eeckstein eeckstein deleted the fix-simplify-cfg-4.0 branch August 28, 2017 23:34
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.

1 participant