Skip to content

Change the signature of _swift_withWin32DbgHelpLibrary() to not use std::function (which is not ABI-safe in C functions.) #42582

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
Apr 22, 2022

Conversation

grynspan
Copy link
Contributor

Change the signature of _swift_withWin32DbgHelpLibrary() to not use std::function (which is not ABI-safe in C functions.) This change only affects Windows.

Nothing outside the Swift repo is using this function, so it should not present an ABI-breaking change. The existing signature is still usable by way of a static inline function, so no call sites in the repo need changes.

std::function (which is not ABI-safe in C functions.)
@grynspan
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Nice find!

@grynspan
Copy link
Contributor Author

Nice find!

I mean, less "find" and more "I did it wrong to start with." 🤦

@grynspan grynspan merged commit d619b3f into main Apr 22, 2022
@grynspan grynspan deleted the jgrynspan/fix-win32-dbghelp-signature branch April 22, 2022 21:07
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