From: Michael Anthony Knyszek Date: Thu, 29 May 2025 19:04:08 +0000 (+0000) Subject: cmd/internal/obj/s390x: fix potential recursive String call X-Git-Tag: go1.25rc1~35 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9f3dd846e2ee6e8fcb2c673122d9d0c932e01b71;p=gostls13.git 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 Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- 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() {}