Skip to content

[5.7][capture-promotion] Add support for GEPs from captures that are load_borrowed. #59255

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
Jun 3, 2022

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Jun 3, 2022

We supported this code pattern previously just for loads and never implemented
the support for load_borrow. I just added analogous code for
load_borrow. Without this, we hit a crash since:

  1. We would not process the struct_element_addr for a valid value.
  2. The load_borrow would not look through the struct_element_addr, so we would
    ask the cloner for the mapped value to the struct_element_addr... it was never
    visited, thus never mapped, thus KABOOM.

rdar://93879907
(cherry picked from commit 3b39af3)

…borrowed.

We supported this code pattern previously just for loads and never implemented
the support for load_borrow. I just added analogous code for
load_borrow. Without this, we hit a crash since:

1. We would not process the struct_element_addr for a valid value.
2. The load_borrow would not look through the struct_element_addr, so we would
ask the cloner for the mapped value to the struct_element_addr... it was never
visited, thus never mapped, thus KABOOM.

rdar://93879907
(cherry picked from commit 3b39af3)
@gottesmm gottesmm requested a review from a team as a code owner June 3, 2022 18:39
@gottesmm
Copy link
Contributor Author

gottesmm commented Jun 3, 2022

@swift-ci test

@gottesmm gottesmm requested a review from meg-gupta June 3, 2022 18:39
@gottesmm gottesmm changed the title [capture-promotion] Add support for GEPs from captures that are load_borrowed. [5.7][capture-promotion] Add support for GEPs from captures that are load_borrowed. Jun 3, 2022
@gottesmm gottesmm merged commit 1119b79 into swiftlang:release/5.7 Jun 3, 2022
@gottesmm gottesmm deleted the release/5.7/rdar93879907 branch June 3, 2022 22:35
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.

3 participants