-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Incorrect destructor parameter alignment on windows #60465
Labels
Comments
@llvm/issue-subscribers-clang-codegen |
Reduced reproducer after some investigation into the bug: struct A { virtual ~A(); };
struct alignas(2 * sizeof(void *)) B : virtual A {
~B();
void *x, *y;
};
B::~B() { y = nullptr; }
Note that both |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that both
%0
and%15
are marked withalign 16
even though the offset between them is 24 bytes.This is much reduced with shortened identifiers so that I can still associate it with the original code. This bug manifested as optimized builds crashing at runtime on a
movaps
instruction which was storing to a pointer that was not, in fact, 16 byte aligned, but which was derived from an 8-byte aligned pointer with an incorrectly marked alignment of 16 bytes and an offset that happened to be a multiple of 16 bytes.The text was updated successfully, but these errors were encountered: