cmd/link: bad reflect data when using -linkshared #18252
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
What did you expect to see?
What did you see instead?
Does this issue reproduce with the latest release (go1.7.4)?
The text was updated successfully, but these errors were encountered:
A potential hint:
So the *rtype being returned for *C is correct, but the interface type for *rtype is incorrect. (That is, it is being sourced from the non-canonical module.) I'd look at the asm for reflect.toType, figure out how it finds *rtype, and make sure it passes through the typeOff map.
toType looks like this:
Both the executable and the shared library have a local symbol called "go.itab.*reflect.rtype,reflect.Type". So I guess this is a consequence of https://golang.org/cl/32131 -- and oops, my tests of 1.7 had that cherry-picked into it. Turns out it doesn't happen in the actual 1.7.4 release. Maybe we need a different fix for the bug that was trying to fix.