Skip to content

reflect: DeepEqual can return true for values that are not equal [1.14 backport] #39636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gopherbot opened this issue Jun 17, 2020 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link
Contributor

@ianlancetaylor requested issue #39607 to be considered for backport to the next 1.14 minor release.

I think the bug was introduced by https://golang.org/cl/191940 for #33907. It's broken in 1.14 and tip but works in 1.13 and earlier.

CC @huandu

@gopherbot Please open backport to 1.14.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jun 17, 2020
@gopherbot gopherbot added this to the Go1.14.5 milestone Jun 17, 2020
@gopherbot
Copy link
Contributor Author

Change https://golang.org/cl/238626 mentions this issue: [release-branch.go1.14] reflect: handling flagIndir in DeepEqual potential cycles

@ianlancetaylor
Copy link
Member

This is a bug in reflect.DeepEqual with confusing behavior and no real workaround.

@ianlancetaylor ianlancetaylor added the CherryPickApproved Used during the release process for point releases label Jun 18, 2020
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Jun 18, 2020
@gopherbot
Copy link
Contributor Author

Closed by merging e2ecfdf to release-branch.go1.14.

gopherbot pushed a commit that referenced this issue Jun 18, 2020
…ntial cycles

For #39607
Fixes #39636

Change-Id: Ia7e597e0da8a193a25382cc633a1c6080b4f7cbf
Reviewed-on: https://go-review.googlesource.com/c/go/+/238361
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit d872bbc)
Reviewed-on: https://go-review.googlesource.com/c/go/+/238626
@andybons andybons modified the milestones: Go1.14.5, Go1.14.6 Jul 14, 2020
@golang golang locked and limited conversation to collaborators Jul 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants