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

Fix misaligned struct member used in atomic operation #2519

Merged
merged 2 commits into from Mar 4, 2024

Conversation

dswarbrick
Copy link
Contributor

This fixes a panic caused by attempting to atomically access a struct member which is not 64-bit aligned when running on 32-bit arch, due to the smaller sync.Map struct.

Fixes: #2518

Please consider adding testing with a 32-bit GOARCH (e.g. "386") to your CI testing pipeline to avoid such oversights in future.

@dswarbrick dswarbrick requested a review from a team as a code owner February 27, 2024 16:37
@lucix-aws
Copy link
Contributor

I saw when this came in yesterday, solid find. I was actually planning on adding a 386 arch test in CI as you've called out there, I'll try and add that to this changeset when I get capacity.

@lucix-aws lucix-aws mentioned this pull request Mar 4, 2024
dswarbrick and others added 2 commits March 4, 2024 11:39
This fixes a panic caused by attempting to atomically access a struct
member which is not 64-bit aligned when running on 32-bit arch, due to
the smaller sync.Map struct.

Fixes: #2518

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
@lucix-aws
Copy link
Contributor

Added the x86 test externally and rebased this branch. Test running now, will merge on a pass.

@lucix-aws lucix-aws merged commit 1ad34b3 into aws:main Mar 4, 2024
12 of 13 checks passed
@dswarbrick dswarbrick deleted the fix-unaligned-atomic branch March 9, 2024 00:03
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.

endpointdiscovery.Endpointcache will panic on 32-bit archs
3 participants