Skip to content

AliasAnalysis: fix a bug where an index_addr with zero offset can result in a false no-alias result #42339

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
merged 1 commit into from
Apr 13, 2022

Conversation

eeckstein
Copy link
Contributor

When building a projection path we must ignore zero-indexing projections so that alias analysis
recognizes an "alias" between two addresses where one has such an index_addr 0 instruction and the other doesn't.

…esult in a false no-alias result

When building a projection path we _must_ ignore zero-indexing projections so that alias analysis
recognizes an "alias" between two addresses where one has such an `index_addr 0` instruction and the other doesn't.
@eeckstein eeckstein requested a review from atrick April 13, 2022 07:48
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit aafe109 into swiftlang:main Apr 13, 2022
@eeckstein eeckstein deleted the fix-alias-analysis branch April 13, 2022 12:16
Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

Thanks. It's hard to imagine a more fundamental bug with AliasAnalysis and yet this has been in tree for 6 years. It just goes to show that the current testing strategy can't be relied on.

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.

2 participants