1
0
mirror of https://github.com/golang/go synced 2024-10-04 21:11:22 -06:00
go/src/reflect
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
..
all_test.go cmd/link: correctly decode name length 2016-04-26 15:55:06 +00:00
asm_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_amd64p32.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_arm64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_mips64x.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_ppc64x.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm_s390x.s reflect: add s390x support 2016-04-06 04:23:06 +00:00
deepequal.go all: single space after period. 2016-03-02 00:13:47 +00:00
example_test.go reflect: add method StructTag.Lookup 2016-03-25 04:54:19 +00:00
export_test.go cmd/compile, etc: use nameOff for rtype string 2016-04-22 10:08:05 +00:00
makefunc.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
set_test.go reflect: recognize unnamed directional channels 2016-03-04 20:34:30 +00:00
tostring_test.go
type.go cmd/compile, etc: use nameOff in uncommonType 2016-04-22 13:51:29 +00:00
value.go cmd/compile, etc: use name offset in method tables 2016-04-18 09:12:41 +00:00