From dd3f460cf8bc63a33301698eec07825fd3808117 Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Fri, 28 Jul 2017 17:01:52 +0100 Subject: [PATCH] Fix for #1788. Rearrange struct fields. --- caddyhttp/fastcgi/fastcgi.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/caddyhttp/fastcgi/fastcgi.go b/caddyhttp/fastcgi/fastcgi.go index 76ecf90c..550a795b 100644 --- a/caddyhttp/fastcgi/fastcgi.go +++ b/caddyhttp/fastcgi/fastcgi.go @@ -366,8 +366,11 @@ type balancer interface { // roundRobin is a round robin balancer for fastcgi upstreams. type roundRobin struct { - addresses []string + // Known Go bug: https://golang.org/pkg/sync/atomic/#pkg-note-BUG + // must be first field for 64 bit alignment + // on x86 and arm. index int64 + addresses []string } func (r *roundRobin) Address() string {