Commit 6d279ed
committed
reorder struct items for alignment
On 32-bit platforms, use of atomic.* 64-bit functions needs to be
careful to ensure 64-bit alignment. This was a problem in the
rackAwareRR struct, causing panics on 32-bit platforms.
https://pkg.go.dev/sync/atomic#pkg-note-BUG notes that the first word in
a struct is always 64-bit aligned, to moving the struct member that
causes the issue to the beginning of the struct solves the problem.
See #1666.1 parent fe55d80 commit 6d279ed
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
907 | 912 | | |
908 | 913 | | |
909 | 914 | | |
910 | | - | |
911 | 915 | | |
912 | 916 | | |
913 | 917 | | |
| |||
0 commit comments