Skip to content

Do not apply #pragma pack(1) to NuqStream::AlignedMatrix and ClusterBuf. - #1059

Merged
copybara-service[bot] merged 1 commit into
devfrom
test_999238657
Oct 15, 2026
Merged

copybara-service[bot] merged 1 commit into
devfrom
test_999238657

Conversation

@copybara-service

Copy link
Copy Markdown

Do not apply #pragma pack(1) to NuqStream::AlignedMatrix and ClusterBuf.

#pragma pack(push, 1) on NuqStream currently encloses the nested helper classes AlignedMatrix and ClusterBuf, which contain hwy::AlignedFreeUniquePtr<T[]> (std::unique_ptr) members and are allocated as normal working buffers during compression rather than packed into the bitstream. Under #pragma pack(1), ClusterBuf::argmin is placed at a non-8-byte-aligned offset on 64-bit targets, triggering -fsanitize=alignment on member calls to std::unique_ptr.

@google-cla

google-cla Bot commented Oct 14, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service
copybara-service Bot force-pushed the test_999238657 branch 3 times, most recently from 286c8da to 02380d9 Compare October 15, 2026 17:53
`#pragma pack(push, 1)` on `NuqStream` currently encloses the nested helper classes `AlignedMatrix` and `ClusterBuf`, which contain `hwy::AlignedFreeUniquePtr<T[]>` (`std::unique_ptr`) members and are allocated as normal working buffers during compression rather than packed into the bitstream. Under `#pragma pack(1)`, `ClusterBuf::argmin` is placed at a non-8-byte-aligned offset on 64-bit targets, triggering `-fsanitize=alignment` on member calls to `std::unique_ptr`.

PiperOrigin-RevId: 1000251482
@copybara-service
copybara-service Bot merged commit d8e8269 into dev Oct 15, 2026
10 of 11 checks passed
@copybara-service
copybara-service Bot deleted the test_999238657 branch October 15, 2026 18:01
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.

0 participants