mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
21b7e60c6b
commit
9f3dd846e2
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ func (c CCMask) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// invalid
|
// invalid
|
||||||
return fmt.Sprintf("Invalid (%#x)", c)
|
return fmt.Sprintf("Invalid (%#x)", uint8(c))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (CCMask) CanBeAnSSAAux() {}
|
func (CCMask) CanBeAnSSAAux() {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue