Skip to content

Atomic loads need to be aligned #153

@nhooyr

Description

@nhooyr

See https://golang.org/pkg/sync/atomic/#pkg-note-BUG

On ARM, x86-32, and 32-bit MIPS, it is the caller's responsibility to arrange for 64-bit alignment of 64-bit words accessed atomically. The first word in a variable or in an allocated struct, array, or slice can be relied upon to be 64-bit aligned.

Was reported to me by @andersfylling on reddit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions