-
Notifications
You must be signed in to change notification settings - Fork 18k
reflect: DeepEqual can return true for values that are not equal #39607
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
Comments
Have a look at the addresses printed by this program |
This is working as intended. Please read the docs:
If you still think there's a bug, please explain why. |
This was "false" in 1.13, which is what I'd expect from the docs you quoted. It's "true" now. |
Apologies, I read the code too fast and didn't notice the difference in the strings "foo" and "foobar". |
It looks it doesn't matter what is the type of |
Paging @randall77 and @aclements in case this is code gen or linker data structure related. |
It's a bug in |
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. |
Backport issue(s) opened: #39635 (for 1.13), #39636 (for 1.14). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/238361 mentions this issue: |
Yes. This bug is introduced by that change. As #33907 is still a valid issue and only cyclic interface value can cause stack overflow, I suggest to get ptr value by |
Change https://golang.org/cl/238626 mentions this issue: |
…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
@ianlancetaylor @dmitshur did this change make it into the 1.14.5 release? If not, will there be a 1.14.6 and when might we see it? |
@davecheney 1.14.5 was a security release. 1.14.6 is being released right now (see #40256) and it does include the fix. See backport issue #39636 for more details. |
@dmitshur superb, thanks for your quick response, we have a few folks here at $DAYJOB who are waiting on this fix. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, go1.14.4. It does not happen with go1.13.12.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran https://play.golang.org/p/h2Wt6eYJB0B:
What did you expect to see?
I expected it to print "false".
What did you see instead?
It printed "true".
The text was updated successfully, but these errors were encountered: