Skip to content

Fix panic on 386 and armhf#1334

Open
toddy15 wants to merge 1 commit into
simulot:developfrom
toddy15:develop
Open

Fix panic on 386 and armhf#1334
toddy15 wants to merge 1 commit into
simulot:developfrom
toddy15:develop

Conversation

@toddy15

@toddy15 toddy15 commented Mar 30, 2026

Copy link
Copy Markdown

Hi,

thanks for creating immich-go! I've just built a Debian package for this program and noticed build failures on 386 and armhf. This is a fix I've come up with.

On 386 and armhf, the code panics with "unaligned 64-bit atomic operation". The documentation on https://pkg.go.dev/sync/atomic#AddInt64 has this warning:

"Consider using the more ergonomic and less error-prone Int64.Add instead (particularly if you target 32-bit platforms; see the bugs section)."

The type atomic.Int64 is automatically aligned.

See https://pkg.go.dev/sync/atomic#pkg-notes

On 386 and armhf, the code panics with "unaligned 64-bit atomic operation".
The documentation on https://pkg.go.dev/sync/atomic#AddInt64 has this
warning:

"Consider using the more ergonomic and less error-prone Int64.Add instead
(particularly if you target 32-bit platforms; see the bugs section)."

The type atomic.Int64 is automatically aligned.

See https://pkg.go.dev/sync/atomic#pkg-notes
@toddy15 toddy15 requested a review from simulot as a code owner March 30, 2026 13:14
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.

1 participant