Skip to content

Conversation

eeckstein
Copy link
Contributor

@eeckstein eeckstein commented Sep 1, 2020

We cannot prove that the whole struct is overwritten between two lazy property getters.
We would need AliasAnalysis for this, but currently this is not used in CSE.

Original: #33713

  • Radar: rdar://problem/67734844

  • Explanation: This fixes a miscompile with lazy struct properties.

  • Scope: This is a bug which was introduced by a new optimization in 5.3. It shows up if a value type (e.g. a struct) with a lazy property is overwritten between two accesses of the property.

  • Risk: Low. The only change is to add an additional bail-out condition,.

  • Reviewer: @atrick

We cannot prove that the whole struct is overwritten between two lazy property getters.
We would need AliasAnalysis for this, but currently this is not used in CSE.

rdar://problem/67734844
@eeckstein eeckstein added the r5.3 label Sep 1, 2020
@eeckstein eeckstein requested a review from a team as a code owner September 1, 2020 12:44
@eeckstein eeckstein requested a review from atrick September 1, 2020 12:44
@eeckstein
Copy link
Contributor Author

@swift-ci test

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.

LGTM for 5.3. Thanks!

@airspeedswift airspeedswift merged commit 908f105 into swiftlang:release/5.3 Sep 1, 2020
@eeckstein eeckstein deleted the fix_cse_5.3 branch April 17, 2021 15:02
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks and removed r5.3 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants