Skip to content

Work Around _swiftStaticArrayMetadata Alias Breakage #61322

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
Sep 28, 2022

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Sep 27, 2022

The alias defined here with the .set directive doesn't actually define a symbolic alias that the linker respects in all cases. The resulting standard library dylib does contain a reference to the aliased symbol with the correct value, but the resulting symbol is not actually considered relocatable by the linker. Thus, its value may not always get fixed up properly.

Work around this by dropping the alias for now - directly use the type metadata for Swift.__EmptyArrayStorage instead.

rdar://100288247

The alias defined here with the `.set` directive doesn't actually define a symbolic alias
that the linker respects in all cases. The resulting standard library dylib _does_ contain a
reference to the aliased symbol with the correct value, but the resulting variable is not actually
considered relocatable by the linker. Thus, its value may not always get fixed up properly.

Work around this by dropping the alias for now - directly use the type metadata for Swift.__EmptyArrayStorage
instead.

rdar://100288247
@CodaFi CodaFi requested a review from eeckstein September 27, 2022 21:01
Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

Lgtm

@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 27, 2022

@swift-ci test

@CodaFi CodaFi merged commit 9159f87 into swiftlang:main Sep 28, 2022
@CodaFi CodaFi deleted the whats-in-a-name branch September 28, 2022 02:50
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.

2 participants