[tools] go/analysis/passes/atomicalign: handle pointers to struct

19 views
Skip to first unread message

Aurélien Rainone (Gerrit)

unread,
Feb 27, 2019, 3:19:35 AM2/27/19
to Ian Lance Taylor, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Aurélien Rainone has uploaded this change for review.

View Change

go/analysis/passes/atomicalign: handle pointers to struct

The atomicalign checker detects non-64-bit aligned struct field
arguments to sync/atomic functions but currently misses out cases
where the struct variable identifier is a pointer to struct. This
is very common as it happens when the 64-bit field is accessed
in a method with pointer receiver, where the struct is itself the
method receiver. Add some tests to cover that new case.

While I'm at it, fix some typos.

Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
---
M go/analysis/passes/atomicalign/atomicalign.go
M go/analysis/passes/atomicalign/testdata/src/a/a.go
2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/go/analysis/passes/atomicalign/atomicalign.go b/go/analysis/passes/atomicalign/atomicalign.go
index d3fc3e2..0326bf5 100644
--- a/go/analysis/passes/atomicalign/atomicalign.go
+++ b/go/analysis/passes/atomicalign/atomicalign.go
@@ -21,7 +21,7 @@

var Analyzer = &analysis.Analyzer{
Name: "atomicalign",
- Doc: "check for non-64-bits-aligned arguments to sync/atomic functions",
+ Doc: "check for non-64-bit-aligned arguments to sync/atomic functions",
Requires: []*analysis.Analyzer{inspect.Analyzer},
Run: run,
}
@@ -70,7 +70,7 @@
}

func check64BitAlignment(pass *analysis.Pass, funcName string, arg ast.Expr) {
- // Checks the argument is made of the address operator (&) applied to
+ // Checks the argument is made of the address operator (&) applied
// to a struct field (as opposed to a variable as the first word of
// uint64 and int64 variables can be relied upon to be 64-bit aligned.
unary, ok := arg.(*ast.UnaryExpr)
@@ -80,16 +80,18 @@

// Retrieve the types.Struct in order to get the offset of the
// atomically accessed field.
- sel, ok := unary.X.(*ast.SelectorExpr)
+ selector, ok := unary.X.(*ast.SelectorExpr)
if !ok {
return
}
- tvar, ok := pass.TypesInfo.Selections[sel].Obj().(*types.Var)
+
+ sel := pass.TypesInfo.Selections[selector]
+ tvar, ok := sel.Obj().(*types.Var)
if !ok || !tvar.IsField() {
return
}

- stype, ok := pass.TypesInfo.Types[sel.X].Type.Underlying().(*types.Struct)
+ stype, ok := sel.Recv().Underlying().(*types.Struct)
if !ok {
return
}
diff --git a/go/analysis/passes/atomicalign/testdata/src/a/a.go b/go/analysis/passes/atomicalign/testdata/src/a/a.go
index 45dd73d..7aa7278 100644
--- a/go/analysis/passes/atomicalign/testdata/src/a/a.go
+++ b/go/analysis/passes/atomicalign/testdata/src/a/a.go
@@ -228,3 +228,22 @@
atomic.AddUint64(&s1.b, 9) // want "address of non 64-bit aligned field .b passed to atomic.AddUint64"
atomic.AddInt64(&s1.c, 9)
}
+
+type t struct {
+ _ int32
+ a int64
+ _ int16
+ _ int16
+ b uint64
+}
+
+func (t *t) structPointerReceiver() {
+ atomic.LoadInt64(&t.a) // want "address of non 64-bit aligned field .a passed to atomic.LoadInt64"
+ atomic.LoadUint64(&t.b)
+}
+
+func structPointer() {
+ t := &t{}
+ atomic.StoreInt64(&t.a, -1) // want "address of non 64-bit aligned field .a passed to atomic.StoreInt64"
+ atomic.StoreUint64(&t.b, 1)
+}

To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
Gerrit-Change-Number: 163997
Gerrit-PatchSet: 1
Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
Gerrit-MessageType: newchange

Aurélien Rainone (Gerrit)

unread,
Feb 27, 2019, 3:24:01 AM2/27/19
to goph...@pubsubhelper.golang.org, Alan Donovan, golang-co...@googlegroups.com

This is the original, untouched CL 158999, that was reverted by 160839.

It should pass on arm but still on 386.

View Change

    To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
    Gerrit-Change-Number: 163997
    Gerrit-PatchSet: 1
    Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
    Gerrit-Comment-Date: Wed, 27 Feb 2019 08:23:58 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Aurélien Rainone (Gerrit)

    unread,
    Feb 27, 2019, 3:24:47 AM2/27/19
    to goph...@pubsubhelper.golang.org, Alan Donovan, golang-co...@googlegroups.com

    Patch Set 1:

    This is the original, untouched CL 158999, that was reverted by 160839.

    It should pass on arm but still on 386.

    still *fail* on 386

    View Change

      To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: tools
      Gerrit-Branch: master
      Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
      Gerrit-Change-Number: 163997
      Gerrit-PatchSet: 1
      Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
      Gerrit-Comment-Date: Wed, 27 Feb 2019 08:24:43 +0000

      Alan Donovan (Gerrit)

      unread,
      Feb 28, 2019, 9:08:47 AM2/28/19
      to Aurélien Rainone, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

      Patch set 1:Run-TryBot +1

      View Change

        To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: tools
        Gerrit-Branch: master
        Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
        Gerrit-Change-Number: 163997
        Gerrit-PatchSet: 1
        Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
        Gerrit-Reviewer: Alan Donovan <adon...@google.com>
        Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
        Gerrit-Comment-Date: Thu, 28 Feb 2019 14:08:45 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        Gerrit-MessageType: comment

        Gobot Gobot (Gerrit)

        unread,
        Feb 28, 2019, 9:08:52 AM2/28/19
        to Aurélien Rainone, goph...@pubsubhelper.golang.org, Alan Donovan, golang-co...@googlegroups.com

        TryBots beginning. Status page: https://farmer.golang.org/try?commit=6f1c52a6

        View Change

          To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: tools
          Gerrit-Branch: master
          Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
          Gerrit-Change-Number: 163997
          Gerrit-PatchSet: 1
          Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
          Gerrit-Reviewer: Alan Donovan <adon...@google.com>
          Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
          Gerrit-CC: Gobot Gobot <go...@golang.org>
          Gerrit-Comment-Date: Thu, 28 Feb 2019 14:08:49 +0000

          Gobot Gobot (Gerrit)

          unread,
          Feb 28, 2019, 9:11:42 AM2/28/19
          to Aurélien Rainone, goph...@pubsubhelper.golang.org, Alan Donovan, golang-co...@googlegroups.com

          Build is still in progress...
          This change failed on linux-386:
          See https://storage.googleapis.com/go-build-log/1f17d610/linux-386_8fe595f5.log

          Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report.

          View Change

            To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: tools
            Gerrit-Branch: master
            Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
            Gerrit-Change-Number: 163997
            Gerrit-PatchSet: 1
            Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
            Gerrit-Reviewer: Alan Donovan <adon...@google.com>
            Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
            Gerrit-CC: Gobot Gobot <go...@golang.org>
            Gerrit-Comment-Date: Thu, 28 Feb 2019 14:11:39 +0000

            Gobot Gobot (Gerrit)

            unread,
            Feb 28, 2019, 9:14:26 AM2/28/19
            to Aurélien Rainone, goph...@pubsubhelper.golang.org, Alan Donovan, golang-co...@googlegroups.com

            8 of 18 TryBots failed:
            Failed on linux-386: https://storage.googleapis.com/go-build-log/1f17d610/linux-386_8fe595f5.log
            Failed on linux-amd64-race: https://storage.googleapis.com/go-build-log/1f17d610/linux-amd64-race_5465c046.log
            Failed on misc-vet-vetall: https://storage.googleapis.com/go-build-log/1f17d610/misc-vet-vetall_31e5600a.log
            Failed on linux-amd64: https://storage.googleapis.com/go-build-log/1f17d610/linux-amd64_fc75b8db.log
            Failed on freebsd-amd64-12_0: https://storage.googleapis.com/go-build-log/1f17d610/freebsd-amd64-12_0_41493a7c.log
            Failed on openbsd-amd64-64: https://storage.googleapis.com/go-build-log/1f17d610/openbsd-amd64-64_8827543a.log
            Failed on windows-amd64-2016: https://storage.googleapis.com/go-build-log/1f17d610/windows-amd64-2016_398775c1.log
            Failed on windows-386-2008: https://storage.googleapis.com/go-build-log/1f17d610/windows-386-2008_de2d5b73.log

            Consult https://build.golang.org/ to see whether they are new failures.

            Patch set 1:TryBot-Result -1

            View Change

              To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
              Gerrit-Change-Number: 163997
              Gerrit-PatchSet: 1
              Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
              Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
              Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
              Gerrit-Comment-Date: Thu, 28 Feb 2019 14:14:23 +0000

              Aurélien Rainone (Gerrit)

              unread,
              May 28, 2019, 6:55:49 PM5/28/19
              to Gobot Gobot, Alan Donovan, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

              Aurélien Rainone uploaded patch set #3 to this change.

              View Change

              go/analysis/passes/atomicalign: handle pointers to struct

              The atomicalign checker detects non-64-bit aligned struct field
              arguments to sync/atomic functions but currently misses out cases
              where the struct variable identifier is a pointer to struct. This
              is very common as it happens when the 64-bit field is accessed
              in a method with pointer receiver, where the struct is itself the
              method receiver. Add some tests to cover that new case.

              While I'm at it, fix some typos.

              Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
              ---
              M go/analysis/passes/atomicalign/atomicalign.go
              M go/analysis/passes/atomicalign/testdata/src/a/a.go
              2 files changed, 31 insertions(+), 7 deletions(-)

              To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
              Gerrit-Change-Number: 163997
              Gerrit-PatchSet: 3
              Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
              Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
              Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
              Gerrit-MessageType: newpatchset

              Brad Fitzpatrick (Gerrit)

              unread,
              May 28, 2019, 7:02:12 PM5/28/19
              to Aurélien Rainone, goph...@pubsubhelper.golang.org, Brad Fitzpatrick, Gobot Gobot, Alan Donovan, golang-co...@googlegroups.com

              View Change

              1 comment:

              To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
              Gerrit-Change-Number: 163997
              Gerrit-PatchSet: 3
              Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
              Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
              Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
              Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
              Gerrit-Comment-Date: Tue, 28 May 2019 23:02:08 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Gerrit-MessageType: comment

              Aurélien Rainone (Gerrit)

              unread,
              May 28, 2019, 7:07:01 PM5/28/19
              to goph...@pubsubhelper.golang.org, Brad Fitzpatrick, Gobot Gobot, Alan Donovan, golang-co...@googlegroups.com

              View Change

              1 comment:

                • What about "mipsle"? […]

                  As this had been reverted because it was failing on some architectures on which I hadn't plan that it would :) I though I'd give it another try by limiting the affected archs to the list of arches specified in the sync/atomic BUG note.

              To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
              Gerrit-Change-Number: 163997
              Gerrit-PatchSet: 3
              Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
              Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
              Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
              Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
              Gerrit-Comment-Date: Tue, 28 May 2019 23:06:58 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Brad Fitzpatrick <brad...@golang.org>
              Gerrit-MessageType: comment

              Aurélien Rainone (Gerrit)

              unread,
              May 28, 2019, 7:12:27 PM5/28/19
              to goph...@pubsubhelper.golang.org, Brad Fitzpatrick, Gobot Gobot, Alan Donovan, golang-co...@googlegroups.com

              Honestly I'm a bit in the dark, I don't know wether the failed builds were due to the logic code being wrong somewhere or the list of architectures on which this runs not enough restrictive

              View Change

                To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: tools
                Gerrit-Branch: master
                Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                Gerrit-Change-Number: 163997
                Gerrit-PatchSet: 3
                Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                Gerrit-Comment-Date: Tue, 28 May 2019 23:12:23 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: No
                Gerrit-MessageType: comment

                Aurélien Rainone (Gerrit)

                unread,
                Jun 2, 2019, 2:19:02 PM6/2/19
                to Gobot Gobot, Alan Donovan, goph...@pubsubhelper.golang.org, Brad Fitzpatrick, golang-co...@googlegroups.com

                Aurélien Rainone uploaded patch set #4 to this change.

                View Change

                go/analysis/passes/atomicalign: handle pointers to struct

                The atomicalign checker detects non-64-bit aligned struct field
                arguments to sync/atomic functions but currently misses out cases
                where the struct variable identifier is a pointer to struct. This
                is very common as it happens when the 64-bit field is accessed
                in a method with pointer receiver, where the struct is itself the
                method receiver. Add some tests to cover that new case.

                While I'm at it, fix some typos.

                Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                ---
                M go/analysis/passes/atomicalign/atomicalign.go
                M go/analysis/passes/atomicalign/testdata/src/a/a.go
                2 files changed, 31 insertions(+), 7 deletions(-)

                To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: tools
                Gerrit-Branch: master
                Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                Gerrit-Change-Number: 163997
                Gerrit-PatchSet: 4
                Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                Gerrit-MessageType: newpatchset

                Aurélien Rainone (Gerrit)

                unread,
                Jun 2, 2019, 2:21:41 PM6/2/19
                to goph...@pubsubhelper.golang.org, Brad Fitzpatrick, Gobot Gobot, Alan Donovan, golang-co...@googlegroups.com

                Could somebody run try-bots to know wether at least some platforms are fixed?

                View Change

                  To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: tools
                  Gerrit-Branch: master
                  Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                  Gerrit-Change-Number: 163997
                  Gerrit-PatchSet: 4
                  Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                  Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                  Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                  Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                  Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                  Gerrit-Comment-Date: Sun, 02 Jun 2019 18:21:37 +0000

                  Daniel Martí (Gerrit)

                  unread,
                  Jun 2, 2019, 5:48:40 PM6/2/19
                  to Aurélien Rainone, goph...@pubsubhelper.golang.org, Brad Fitzpatrick, Gobot Gobot, Alan Donovan, golang-co...@googlegroups.com

                  Patch set 4:Run-TryBot +1

                  View Change

                    To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: tools
                    Gerrit-Branch: master
                    Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                    Gerrit-Change-Number: 163997
                    Gerrit-PatchSet: 4
                    Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                    Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                    Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
                    Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                    Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                    Gerrit-Comment-Date: Sun, 02 Jun 2019 21:48:34 +0000

                    Gobot Gobot (Gerrit)

                    unread,
                    Jun 2, 2019, 5:48:45 PM6/2/19
                    to Aurélien Rainone, goph...@pubsubhelper.golang.org, Daniel Martí, Brad Fitzpatrick, Alan Donovan, golang-co...@googlegroups.com

                    TryBots beginning. Status page: https://farmer.golang.org/try?commit=8c8d3cd5

                    View Change

                      To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                      Gerrit-Project: tools
                      Gerrit-Branch: master
                      Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                      Gerrit-Change-Number: 163997
                      Gerrit-PatchSet: 4
                      Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                      Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                      Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
                      Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                      Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                      Gerrit-Comment-Date: Sun, 02 Jun 2019 21:48:41 +0000

                      Gobot Gobot (Gerrit)

                      unread,
                      Jun 2, 2019, 5:52:44 PM6/2/19
                      to Aurélien Rainone, goph...@pubsubhelper.golang.org, Daniel Martí, Brad Fitzpatrick, Alan Donovan, golang-co...@googlegroups.com

                      Build is still in progress...
                      This change failed on linux-386:

                      See https://storage.googleapis.com/go-build-log/ce656af9/linux-386_109185b7.log

                      Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test *exactly* your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed.

                      View Change

                        To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: tools
                        Gerrit-Branch: master
                        Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                        Gerrit-Change-Number: 163997
                        Gerrit-PatchSet: 4
                        Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                        Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                        Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                        Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
                        Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                        Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                        Gerrit-Comment-Date: Sun, 02 Jun 2019 21:52:28 +0000

                        Gobot Gobot (Gerrit)

                        unread,
                        Jun 2, 2019, 5:56:45 PM6/2/19
                        to Aurélien Rainone, goph...@pubsubhelper.golang.org, Daniel Martí, Brad Fitzpatrick, Alan Donovan, golang-co...@googlegroups.com

                        3 of 10 TryBots failed:
                        Failed on linux-386: https://storage.googleapis.com/go-build-log/ce656af9/linux-386_109185b7.log
                        Failed on windows-386-2008: https://storage.googleapis.com/go-build-log/ce656af9/windows-386-2008_42f8d548.log
                        Failed on linux-amd64-race: https://storage.googleapis.com/go-build-log/ce656af9/linux-amd64-race_9d4c3552.log

                        Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test *exactly* your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed.

                        Patch set 4:TryBot-Result -1

                        View Change

                          To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                          Gerrit-Project: tools
                          Gerrit-Branch: master
                          Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                          Gerrit-Change-Number: 163997
                          Gerrit-PatchSet: 4
                          Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                          Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                          Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                          Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
                          Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                          Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                          Gerrit-Comment-Date: Sun, 02 Jun 2019 21:56:24 +0000

                          Aurélien Rainone (Gerrit)

                          unread,
                          Jun 3, 2019, 3:39:11 PM6/3/19
                          to goph...@pubsubhelper.golang.org, Gobot Gobot, Daniel Martí, Brad Fitzpatrick, Alan Donovan, golang-co...@googlegroups.com

                          Thanks for the try-bots Daniel.

                          So among the 3 failures, I believe only 2 were due to this CL: linux windows-386 and linux-386, 2 platforms that should be affected by the 64-bit alignment bug, per the sync/atomic BUG note.

                          The tests failures are located on the exact same lines for both platforms.

                          Basically the test is doing: on platforms that should be affected, I atomically access a field that I arranged NOT to be 64-bit aligned. The problem is that the fields gets 64-bit aligned, making the analyzer fail.
                          NOTE: this behavior is only triggered for struct fields accessed in a method in which the received is the containing struct. When the field is accessed in a free function, the test passes, which should mean the fields aren't 64-bit aligned, are caught by the analyzer, the test pass.

                          To sum up:

                          The analyzer follows the BUG note, that says ARM, x86-32, and 32-bit MIPS should have the problem, but test only are green on ARM.

                          Could it be that the alignment problem is deterministic on ARM but not on x86-32 and mips?

                          View Change

                            To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                            Gerrit-Project: tools
                            Gerrit-Branch: master
                            Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                            Gerrit-Change-Number: 163997
                            Gerrit-PatchSet: 4
                            Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                            Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                            Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                            Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
                            Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                            Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                            Gerrit-Comment-Date: Mon, 03 Jun 2019 19:39:07 +0000

                            Daniel Martí (Gerrit)

                            unread,
                            Aug 28, 2019, 7:15:37 AM8/28/19
                            to Aurélien Rainone, goph...@pubsubhelper.golang.org, Michael Matloob, Ian Cottrell, Gobot Gobot, Brad Fitzpatrick, Alan Donovan, golang-co...@googlegroups.com

                            Sorry, this is where my knowledge of architectures falls short. Perhaps Michael or Ian know better, who maintain go/analysis.

                            View Change

                              To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: tools
                              Gerrit-Branch: master
                              Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                              Gerrit-Change-Number: 163997
                              Gerrit-PatchSet: 4
                              Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                              Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                              Gerrit-Reviewer: Daniel Martí <mv...@mvdan.cc>
                              Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                              Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
                              Gerrit-CC: Brad Fitzpatrick <brad...@golang.org>
                              Gerrit-CC: Ian Cottrell <ianco...@google.com>
                              Gerrit-Comment-Date: Wed, 28 Aug 2019 11:15:34 +0000

                              Daniel Martí (Gerrit)

                              unread,
                              Aug 28, 2019, 7:15:39 AM8/28/19
                              to Aurélien Rainone, goph...@pubsubhelper.golang.org, Brad Fitzpatrick, Michael Matloob, Ian Cottrell, Gobot Gobot, Alan Donovan, golang-co...@googlegroups.com

                              Daniel Martí removed Brad Fitzpatrick from this change.

                              View Change

                              To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: tools
                              Gerrit-Branch: master
                              Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                              Gerrit-Change-Number: 163997
                              Gerrit-PatchSet: 4
                              Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                              Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                              Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                              Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
                              Gerrit-CC: Ian Cottrell <ianco...@google.com>
                              Gerrit-MessageType: deleteReviewer

                              Daniel Martí (Gerrit)

                              unread,
                              Aug 28, 2019, 7:15:41 AM8/28/19
                              to Aurélien Rainone, goph...@pubsubhelper.golang.org, Alan Donovan, Michael Matloob, Ian Cottrell, Gobot Gobot, golang-co...@googlegroups.com

                              Daniel Martí removed Alan Donovan from this change.

                              View Change

                              To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: tools
                              Gerrit-Branch: master
                              Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                              Gerrit-Change-Number: 163997
                              Gerrit-PatchSet: 4
                              Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>

                              Aurélien Rainone (Gerrit)

                              unread,
                              Aug 28, 2019, 10:35:56 AM8/28/19
                              to goph...@pubsubhelper.golang.org, Michael Matloob, Ian Cottrell, Gobot Gobot, golang-co...@googlegroups.com

                              NOTE: ... which the received is ...

                              Oups: obviously I meant "receiver" here

                              View Change

                                To view, visit change 163997. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: tools
                                Gerrit-Branch: master
                                Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                                Gerrit-Change-Number: 163997
                                Gerrit-PatchSet: 4
                                Gerrit-Owner: Aurélien Rainone <aurelien...@gmail.com>
                                Gerrit-Reviewer: Aurélien Rainone <aurelien...@gmail.com>
                                Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
                                Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
                                Gerrit-CC: Ian Cottrell <ianco...@google.com>
                                Gerrit-Comment-Date: Wed, 28 Aug 2019 14:35:51 +0000

                                Michael Matloob (Gerrit)

                                unread,
                                Mar 16, 2026, 2:25:33 PMMar 16
                                to Aurelien RAINONE, goph...@pubsubhelper.golang.org, Ian Cottrell, Gopher Robot, golang-co...@googlegroups.com
                                Attention needed from Aurelien RAINONE

                                Michael Matloob added 1 comment

                                Patchset-level comments
                                File-level comment, Patchset 4 (Latest):
                                Michael Matloob . resolved

                                Hi sorry this fell through the cracks. If this still needs review, we should find someone with more context to review this.

                                Open in Gerrit

                                Related details

                                Attention is currently required from:
                                • Aurelien RAINONE
                                Submit Requirements:
                                • requirement is not satisfiedCode-Review
                                • requirement is not satisfiedNo-Unresolved-Comments
                                • requirement is not satisfiedReview-Enforcement
                                • requirement is not satisfiedTryBots-Pass
                                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                                Gerrit-MessageType: comment
                                Gerrit-Project: tools
                                Gerrit-Branch: master
                                Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                                Gerrit-Change-Number: 163997
                                Gerrit-PatchSet: 4
                                Gerrit-Owner: Aurelien RAINONE <aurelien...@gmail.com>
                                Gerrit-Reviewer: Aurelien RAINONE <aurelien...@gmail.com>
                                Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                                Gerrit-CC: Ian Cottrell <ianco...@google.com>
                                Gerrit-Attention: Aurelien RAINONE <aurelien...@gmail.com>
                                Gerrit-Comment-Date: Mon, 16 Mar 2026 18:25:29 +0000
                                Gerrit-HasComments: Yes
                                Gerrit-Has-Labels: No
                                unsatisfied_requirement
                                open
                                diffy

                                Aurelien RAINONE (Gerrit)

                                unread,
                                Jun 6, 2026, 5:54:38 PM (8 hours ago) Jun 6
                                to goph...@pubsubhelper.golang.org, Ian Cottrell, Gopher Robot, golang-co...@googlegroups.com

                                Aurelien RAINONE abandoned this change.

                                View Change

                                Abandoned

                                Aurelien RAINONE abandoned this change

                                Related details

                                Attention set is empty
                                Submit Requirements:
                                • requirement is not satisfiedCode-Review
                                • requirement is not satisfiedNo-Unresolved-Comments
                                • requirement is not satisfiedReview-Enforcement
                                • requirement is not satisfiedTryBots-Pass
                                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                                Gerrit-MessageType: abandon
                                Gerrit-Project: tools
                                Gerrit-Branch: master
                                Gerrit-Change-Id: Ifdab50879af8e978a31bea1cf100fc020f92d722
                                Gerrit-Change-Number: 163997
                                unsatisfied_requirement
                                open
                                diffy
                                Reply all
                                Reply to author
                                Forward
                                0 new messages