Fixed 64-bit alignment panic in the interim struct on 32-bit platforms - #437
Merged
Merged
Conversation
Thejas-bhat
requested review from
CascadingRadium,
Likith101,
Samsonnyyeet,
Thejas-bhat,
capemox,
maneuvertomars and
steveyen
July 20, 2026 17:20
Member
|
@wu thanks for the contribution!
yes, if you've tested out the fixes for the remaining call sites, feel free to open the follow up PRs, thanks! |
Thejas-bhat
approved these changes
Jul 20, 2026
maneuvertomars
approved these changes
Jul 22, 2026
Member
|
@wu, we've merged these changes in, feel free to open the follow up ones |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's the same story as #147, #148, and #290, but for the v17
interimstruct:bytesWrittenis accessed atomically but sits at a 4-byte offset on 32-bit platforms, so the first segment write panics withunaligned 64-bit atomic operation.We hit this on ARMv6 when upgrading bleve v2.5.7 → v2.6.0, the first bleve release that writes zapx/v17 segments. We've pinned bleve at v2.5.7 until a fixed v17 release is available.
Verified on ARMv6 hardware (CI runner on a 32-bit ARM SBC). Before this change,
TestBuildpanics:With this change, the full test suite passes on the same runner (and on amd64 with
-race).While auditing the remaining atomic 64-bit call sites I found the same layout in
vectorIndexOpaque.bytesWrittenandcacheEntry.refs(vectors build) — happy to send a follow-up PR for those if useful.