-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
reflect: tests fail with -linkshared #19003
Comments
So we have a type that lives on the heap ("base 0xc4203bbdc0") but has a non-zero ptrToThis? How does that happen? |
Oh because when PtrTo needs to create a new type it starts by copying *unsafe.Pointer, which has a non-zero ptrToThis. One line fix incoming. |
Well no, because the obvious fix, to whit this:
causes this failure:
for reasons I totally don't understand at this point. |
I believe TestTypelinksSorted was not designed with multiple modules in mind, and needs some rethinking. I'm happy to do this if you like. |
Oh right yeah, this test is just invalid in this case isn't it. So I think the fix is valid. |
FWIW, this bug isn't directly related to dynamic linking, for example this fails in the same way:
|
CL https://golang.org/cl/36731 mentions this issue. |
Cherry-pick for Go 1.8 https://go-review.googlesource.com/36718 |
CL https://golang.org/cl/36718 mentions this issue. |
…g result on heap Otherwise, calling PtrTo on the result will fail. Fixes #19003 Change-Id: I8d7d1981a5d0417d5aee52740469d71e90734963 Reviewed-on: https://go-review.googlesource.com/36731 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-on: https://go-review.googlesource.com/36718 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
On tip:
May just be a bogus test.
First seen on #16602.
The text was updated successfully, but these errors were encountered: