go/src/cmd/link
David Crawshaw 96b8f70e22 cmd/link: correctly decode name length
The linker was incorrectly decoding type name lengths, causing
typelinks to be sorted out of order and in cases where the name was
the exact right length, linker panics.

Added a test to the reflect package that causes TestTypelinksSorted
to fail before this CL. It's not the exact failure seen in #15448
but it has the same cause: decodetype_name calculating the wrong
length.

The equivalent decoders in reflect/type.go and runtime/type.go
have the parenthesis in the right place.

Fixes #15448

Change-Id: I33257633d812b7d2091393cb9d6cc8a73e0138c8
Reviewed-on: https://go-review.googlesource.com/22403
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-26 15:55:06 +00:00
..
internal cmd/link: correctly decode name length 2016-04-26 15:55:06 +00:00
doc.go cmd/link: add -extar option to set ar program for c-archive 2016-01-26 18:52:36 +00:00
link_test.go cmd/link: handle long symbol names 2016-04-13 20:31:43 +00:00
main.go cmd/link: add s390x to link tool main function 2016-04-08 16:00:41 +00:00