Skip to content

[SYCL] Fix unintentional vtable ABI break in HostKernelBase #15310

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

Conversation

steffenlarsen
Copy link
Contributor

The changes in #15256 unintentionally broke ABI by reordering the virtual member functions of HostKernelBase. This commit amends this by moving the new function to the end of the new member function.

Additionally, this fixes a typo in the new function.

The changes in intel#15256 unintentionally
broke ABI by reordering the virtual member functions of HostKernelBase.
This commit amends this by moving the new function to the end of the
new member function.

Additionally, this fixes a typo in the new function.

Signed-off-by: Larsen, Steffen <[email protected]>
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

LGTM, just a question: why didn't we notice the ABI break in pre-commit? Should we add more testing?

@againull againull merged commit b466cd0 into intel:sycl Sep 6, 2024
13 checks passed
@AlexeySachkov
Copy link
Contributor

LGTM, just a question: why didn't we notice the ABI break in pre-commit? Should we add more testing?

Just discussed it with @steffenlarsen offline. We had a test for vtable layout of the class in question in sycl/test/abi/vtable.cpp, but it was completely and mistakenly removed by #14460. It should have been updated to only have one line removed from it, but it was removed completely.

When we reinstated it in #15256 we went from "empty" to "something" and there was no way to check that "something" is not what we had before #14460 so we accidentally changed the layout without noticing.

Not sure if there is an extra automation or test which we could do, but a stricter code review would have definitely helped in #14460.

AlexeySachkov pushed a commit to AlexeySachkov/llvm that referenced this pull request Nov 26, 2024
)

The changes in intel#15256 unintentionally
broke ABI by reordering the virtual member functions of HostKernelBase.
This commit amends this by moving the new function to the end of the new
member function.

Additionally, this fixes a typo in the new function.

---------

Signed-off-by: Larsen, Steffen <[email protected]>
Co-authored-by: Marcos Maronas <[email protected]>
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.

4 participants