Skip to content

[stdlib] Fix calling convention mismatch for debugger utility functions #5506

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

Conversation

kateinoigakukun
Copy link
Member

Cherry-pick 8addaa1

The functions `swift_retainCount`, `swift_unownedRetainCount`, and
`swift_weakRetainCount` are declared in `HeapObject.h` as using
the C calling convention, but the Swift declarations referenced them
by `@_silgen_name`, which uses the Swift calling convention. This
patch fixes the mismatch without any ABI/API breakage by calling the
utility functions through C interop.
@kateinoigakukun kateinoigakukun force-pushed the katei/cherry-pick-to-downstream/heapobject-cc-violation branch from 65af10a to e3b2c44 Compare June 9, 2023 17:08
@kateinoigakukun kateinoigakukun marked this pull request as ready for review June 10, 2023 05:26
@kateinoigakukun kateinoigakukun merged commit c6a1dbf into swiftwasm Jun 10, 2023
@kateinoigakukun kateinoigakukun deleted the katei/cherry-pick-to-downstream/heapobject-cc-violation branch June 29, 2023 02:17
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