aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2025-05-29 19:04:08 +0000
committerGopher Robot <gobot@golang.org>2025-05-29 12:49:45 -0700
commit9f3dd846e2ee6e8fcb2c673122d9d0c932e01b71 (patch)
tree0c5091f3e6a452c9323e5f8ab9d5557881c6a24c
parent21b7e60c6b64dd3221ab5b95d164fb42492029e8 (diff)
downloadgo-9f3dd846e2ee6e8fcb2c673122d9d0c932e01b71.tar.xz
cmd/internal/obj/s390x: fix potential recursive String call
This String method can potentially recurse infinitely, since %#x will apparently call String if the method exists. This isn't well documented, but cmd/vet will be updated soon to check this (when we update the vendored x/tools dependency) so cut off the recursion by converting to the underlying type first. Change-Id: Ia6fc046c9eb56a5dd6a33772afd23da443a06116 Reviewed-on: https://go-review.googlesource.com/c/go/+/677261 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
-rw-r--r--src/cmd/internal/obj/s390x/condition_code.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/s390x/condition_code.go b/src/cmd/internal/obj/s390x/condition_code.go
index f498fd6f77..3330d1310d 100644
--- a/src/cmd/internal/obj/s390x/condition_code.go
+++ b/src/cmd/internal/obj/s390x/condition_code.go
@@ -122,7 +122,7 @@ func (c CCMask) String() string {
}
// invalid
- return fmt.Sprintf("Invalid (%#x)", c)
+ return fmt.Sprintf("Invalid (%#x)", uint8(c))
}
func (CCMask) CanBeAnSSAAux() {}