This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On 32 bits system like armv7 (raspberry pi), using
atomic.AddInt64
(and other variants) resulted in a nil pointer exception. I understand datadog does not officially support arm, but since the fix is pretty easy in this case, it seemed like a good candidate for a PR.This go issue has more details golang/go#599
In our case we make limited use of 64 bits atomic functions, in two places:
runCounter
: This is only used for logging and assuming an increment each second would overflow in 70 years if 32 bits, so is most likely saferealTimeEnabled
: This is used as a pseudo bolean so 0/1 and is safeI've recompiled the agent 6.5.2 from source using this fix and I'm successfully running it on my Raspberry Pi, with processes reporting.
For the record, log output without the fix: