Skip to content

Fix field count in emitted reflection data #78981

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 2 commits into from
Jan 28, 2025

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Jan 28, 2025

PR #78467 omitted certain fields from the FieldDescriptor list,
but did not update the count of fields that's emitted
just before that list. That PR was merged to release/6.1 in #78607.

This updates the count so it matches the number of field descriptors
we actually emit.

Reviewed by: @egorzhdan @mikeash

Impact: Fixes RemoteMirror field reflection, which is used by tools such as leaks, heap, and lldb.

Risk: Low, fixes a broken count in metadata emitted for certain imported C++ types.

Original PR: #78961

Resolves rdar://143763116

EDITED: #79038 has the test that verifies the correctness of this fix.

tbkka added 2 commits January 28, 2025 08:54
PR swiftlang#78467 omitted certain fields from the FieldDescriptor list,
but did not update the count of fields that's emitted
just before that list.

Update the count so it matches the number of field descriptors
we actually emit.

Resolves rdar://143402921
@tbkka tbkka requested a review from a team as a code owner January 28, 2025 17:01
@tbkka
Copy link
Contributor Author

tbkka commented Jan 28, 2025

@swift-ci Please test

@tbkka tbkka merged commit 72810db into swiftlang:release/6.1 Jan 28, 2025
5 checks passed
tbkka added a commit to tbkka/swift that referenced this pull request Jan 30, 2025
**Without swiftlang#78981**: This test triggers "Reflection section too small to contain next record"
errors, indicating that the field information is broken.

**With swiftlang#78981**: This test runs to completion without triggering
the error message above.
@tbkka tbkka mentioned this pull request Jan 30, 2025
tbkka added a commit that referenced this pull request Jan 30, 2025
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