From 138bfc7cf55d063251fe198bf2e25ee32bcb1c9c Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Thu, 5 Oct 2023 09:17:54 +0300 Subject: [PATCH] private/storage/streams/buffer: fix unaligned LoadInt64 atomic.LoadInt64 must be aligned on a 8 byte boundary on arm. Also run staticcheck for arm 32bit to ensure we don't regress on this issue. Fixes https://github.com/storj/uplink/issues/156 Change-Id: Iefdfe40b1295df118b3b4c576679582130711bf0 --- Jenkinsfile | 1 + private/storage/streams/buffer/backend.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8f172744..9dedd433 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,6 +58,7 @@ pipeline { sh 'check-errs ./...' sh './scripts/check-dependencies.sh' sh 'staticcheck ./...' + sh 'GOOS=linux GOARCH=arm staticcheck ./...' sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run' sh 'go-licenses check ./...' sh './scripts/check-libuplink-size.sh' diff --git a/private/storage/streams/buffer/backend.go b/private/storage/streams/buffer/backend.go index 28668ea2..49d0c90c 100644 --- a/private/storage/streams/buffer/backend.go +++ b/private/storage/streams/buffer/backend.go @@ -25,8 +25,8 @@ func NewMemoryBackend(cap int64) *MemoryBackend { // MemoryBackend implements the Backend interface backed by a slice. type MemoryBackend struct { - buf []byte len int64 + buf []byte closed bool }