Skip to content

Conversation

unionsep
Copy link

@unionsep unionsep commented Sep 6, 2024

TL;DR

This Pull Request addresses memory alignment issues encountered in Go's 32-bit build environment.

Longer version

I need to run DataDog in a Go 32-bit build environment. While using DataDog/dd-trace-go.v1, I encountered the following panic error in datadog-go:

panic: unaligned 64-bit atomic operation

(Reference: BufferedMetricContext.go Line 53)

In a 32-bit build environment, it's sometimes not possible to align 64-bit data types correctly to an 8-byte boundary. To address this, I aligned to a 4-byte boundary using an underscore variable. This change allowed DataDog to operate correctly in the 32-bit build environment.

Although this is a rare case, I would appreciate it if you could consider incorporating this fix.

@unionsep unionsep marked this pull request as ready for review September 6, 2024 08:37
@unionsep unionsep requested a review from a team September 6, 2024 08:37
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