Detect bit alignment issues when using "sync/atomic" to access struct fields

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Find a way to detect runtime errors like

      panic: unaligned 64-bit atomic operation [recovered]
      

      during a CI run. Those errors can happen when you run the mongo-go-driver on certain 32-bit architectures (e.g. some 32-bit ARM platforms). Some static analysis tools, like `go vet`, may provide a checker for 64-bit alignment atomically-accessed struct fields.

      See PR #723 for the original context of this improvement.

      See this article for more information on memory alignment in Go.

              Assignee:
              Unassigned
              Reporter:
              Matt Dale
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: