Skip to content
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

Fixed 64-bit alignment panic in chunkedContentCoder on 32-bit platforms. #148

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

cj123
Copy link
Contributor

@cj123 cj123 commented Feb 17, 2023

Following the fix in #147, a 'panic: unaligned 64-bit atomic operation' is still occurring on some platforms.

As noted in #147, this commit implements the alternative fix by placing the bytesWritten field at the top of the struct. Per the Golang sync/atomic documentation, on ARM, 386 and 32-bit MIPS systems, this is the reliable way to prevent these issues.

Following the fix in blevesearch#147, a 'panic: unaligned 64-bit atomic operation' is
still occurring on some platforms.

As noted in blevesearch#147, this commit implements the alternative fix by placing the
bytesWritten field at the top of the struct. Per the Golang sync/atomic
documentation, on ARM, 386 and 32-bit MIPS systems, this is the reliable
way to prevent these issues.

Signed-off-by: Callum Jones <cj@icj.me>
Copy link
Member

@abhinavdangeti abhinavdangeti left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @cj123 . Looks good to me. Let's wait on one other review.

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.

3 participants