Skip to content

[LLDB] Switch from using member_clang_type.GetByteSize() to member_type->GetByteSize() in ParseSingleMember #2975

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
May 19, 2021
Merged

[LLDB] Switch from using member_clang_type.GetByteSize() to member_type->GetByteSize() in ParseSingleMember #2975

merged 1 commit into from
May 19, 2021

Conversation

shafik
Copy link

@shafik shafik commented May 19, 2021

We have a bug in which using member_clang_type.GetByteSize() triggers record
layout and during this process since the record was not yet complete we ended
up reaching a record that had not been layed out yet.
Using member_type->GetByteSize() avoids this situation since it relies on size
from DWARF and will not trigger record layout.

For reference: rdar://77293040

Differential Revision: https://reviews.llvm.org/D102445

(cherry picked from commit 2182eda)

…pe->GetByteSize() in ParseSingleMember

We have a bug in which using member_clang_type.GetByteSize() triggers record
layout and during this process since the record was not yet complete we ended
up reaching a record that had not been layed out yet.
Using member_type->GetByteSize() avoids this situation since it relies on size
from DWARF and will not trigger record layout.

For reference: rdar://77293040

Differential Revision: https://reviews.llvm.org/D102445

(cherry picked from commit 2182eda)
@shafik shafik requested review from Teemperor and adrian-prantl May 19, 2021 18:49
@shafik
Copy link
Author

shafik commented May 19, 2021

@swift-ci please test

Copy link

@Teemperor Teemperor left a comment

Choose a reason for hiding this comment

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

LGTM (I assume this still needs manager approval)

Copy link

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

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

LGTM!

@shafik shafik merged commit 218767c into swiftlang:apple/stable/20210107 May 19, 2021
@shafik shafik requested a review from JDevlieghere May 21, 2021 17:54
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