Skip to content

Avoid infinite recursion in GetBitSize/GetBitAlign. #3093

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
Jul 13, 2021

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 adrian-prantl merged commit 81e923a into swiftlang:swift/next Jul 13, 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.

1 participant