Skip to content

Avoid infinite recursion in GetBitSize/GetBitAlign. #3091

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

adrian-prantl
Copy link

If the lldb::Type does not have static size info attached to it,
Type::GetByteSize() calls back into TypeSystemSwiftTypeRef(), creating
an infinite recursion. This patch avoids this by adding an accessor
that only returns the static or precomputed byte size without the
recursion.

rdar://79874370
(cherry picked from commit 2c98933)

If the lldb::Type does not have static size info attached to it,
Type::GetByteSize() calls back into TypeSystemSwiftTypeRef(), creating
an infinite recursion. This patch avoids this by adding an accessor
that only returns the static or precomputed byte size without the
recursion.

rdar://79874370
(cherry picked from commit 2c98933)
@adrian-prantl
Copy link
Author

#3089

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

3 similar comments
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

@JDevlieghere
Copy link

@swift-ci test

@JDevlieghere JDevlieghere merged commit dd2a1fe into swiftlang:swift/release/5.5 Jul 24, 2021
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