From 99ee616250e865ca8eff8a91bef3824038b411f1 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Sat, 27 Apr 2024 12:37:53 +0300 Subject: internal/runtime/atomic: fix TestAnd64 and TestOr64 The local variable may not be 64bit aligned, which caused arm tests to fail. Fixes #67077 Change-Id: Ia3ae4abcc90319cb10cd593bdc7994cc6eeb3a28 Reviewed-on: https://go-review.googlesource.com/c/go/+/581916 Reviewed-by: Alex Brainman LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Keith Randall Reviewed-by: Keith Randall --- src/internal/runtime/atomic/atomic_andor_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/internal/runtime/atomic/atomic_andor_test.go b/src/internal/runtime/atomic/atomic_andor_test.go index 631a6e637d..5b594d8edf 100644 --- a/src/internal/runtime/atomic/atomic_andor_test.go +++ b/src/internal/runtime/atomic/atomic_andor_test.go @@ -54,6 +54,7 @@ func TestAnd32(t *testing.T) { func TestAnd64(t *testing.T) { // Basic sanity check. x := uint64(0xffffffffffffffff) + sink = &x for i := uint64(0); i < 64; i++ { old := x v := atomic.And64(&x, ^(1 << i)) @@ -131,6 +132,7 @@ func TestOr32(t *testing.T) { func TestOr64(t *testing.T) { // Basic sanity check. x := uint64(0) + sink = &x for i := uint64(0); i < 64; i++ { old := x v := atomic.Or64(&x, 1<