Skip to content

Conversation

@guitargeek
Copy link
Contributor

@guitargeek guitargeek commented Nov 26, 2025

In the RVec code, we assumed that the location of the SmallVectorBase subobject inside the RVec is identical to the RVec itself.

This assumption is not always correct. For example, on AArch64 GCC 14, some extra padding seems to be inserted before the base class.

This commit generalized the implementation of getting the first element by first casting to the SmallVectorBase class, which is what is required to calculate the correct offset to the SmallVectorBase data members.

We can see in this PRs CI run if it actually works:

In the RVec code, we assumed that the location of the SmallVectorBase
subobject inside the RVec is identical to the RVec itself.

This assumption is not always correct. For example, on AArch64 GCC 14,
some extra padding seems to be inserted before the base class.

This commit generalized the implementation of getting the first element
by first casting to the SmallVectorBase class, which is what is required
to calculate the correct offset to the SmallVectorBase data members.
@guitargeek guitargeek self-assigned this Nov 26, 2025
@guitargeek guitargeek requested a review from dpiparo as a code owner November 26, 2025 17:39
@guitargeek guitargeek added the bug label Nov 26, 2025
@guitargeek
Copy link
Contributor Author

Didn't help...

@guitargeek guitargeek closed this Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant