]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile,reflect: allow longer type names
authorKeith Randall <khr@golang.org>
Sun, 9 May 2021 18:06:17 +0000 (11:06 -0700)
committerKeith Randall <khr@golang.org>
Mon, 10 May 2021 13:16:56 +0000 (13:16 +0000)
commit287025925f66f90ad9b30aea2e533928026a8376
treed1d08af3e2dbb39ee461a3d9bc821b406e6a384b
parentc14ecaca8182314efd2ef7280feffc2242644887
cmd/compile,reflect: allow longer type names

Encode the length of type names and tags in a varint encoding
instead of a fixed 2-byte encoding. This allows lengths longer
than 65535 (which can happen for large unnamed structs).

Removed the alignment check for #14962, it isn't relevant any more
since we're no longer reading pointers directly out of this data
(it is encoded as an offset which is copied out bytewise).

Fixes #44155
Update #14962

Change-Id: I6084f6027e5955dc16777c87b0dd5ea2baa49629
Reviewed-on: https://go-review.googlesource.com/c/go/+/318249
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/link/internal/ld/decodesym.go
src/internal/reflectlite/all_test.go
src/internal/reflectlite/type.go
src/reflect/all_test.go
src/reflect/type.go
src/runtime/type.go