[GODRIVER-2157] Detect bit alignment issues when using "sync/atomic" to access struct fields Created: 16/Sep/21  Updated: 19/Oct/22  Resolved: 21/May/22

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Matt Dale Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GODRIVER-1066 linter issues Closed
is related to GODRIVER-2236 Atomic alignment of connectionstate i... Closed
Epic Link: Improve Testing Suite
Quarter: FY23Q4

 Description   

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.



 Comments   
Comment by Matt Dale [ 21/May/22 ]

This was resolved as part of GODRIVER-2236 (see PR 810). Closing.

Generated at Thu Feb 08 08:37:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.