Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2157

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

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: 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 Unassigned
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: