Open 912929782 opened 1 year ago
On ARM, 386, and 32-bit MIPS, it is the caller's responsibility to arrange for 64-bit alignment of 64-bit words accessed atomically via the primitive atomic functions (types Int64 and Uint64 are automatically aligned). The first word in an allocated struct, array, or slice; in a global variable; or in a local variable (because the subject of all atomic operations will escape to the heap) can be relied upon to be 64-bit aligned.
https://pkg.go.dev/sync/atomic#pkg-notes
So maybe we should switch to atomic.Int64
from int64
I see 3 options:
atomic.Int64
@912929782 How to reproduce this issue? Does it happen with go test ./...
we'll need to extend our CI with non x86 arch https://github.com/marketplace/actions/run-on-architecture
I expect this problem to occur on x86 systems as well
Forget to say, I am in the library: https://github.com/jpillora/overseer to use bigcache operation, result in this error. @janisz
What help is needed to fix this issue?
We need to reproduce it, best in CI. Maybe we can use qemu for that :thinking:
What is the issue you are having? panic: unaligned 64-bit atomic operation