]> Cypherpunks repositories - gostls13.git/commit
reflect: fix StructOf GC programs
authorKeith Randall <khr@google.com>
Wed, 6 Mar 2019 18:39:08 +0000 (10:39 -0800)
committerKeith Randall <khr@golang.org>
Wed, 6 Mar 2019 20:22:14 +0000 (20:22 +0000)
commit05b3db24c1a48e995ac1f3103a2be9463fac0f96
treea363c2fd419cd27161972040c5700a30dc922d6d
parent1650f1ba0b964a06a242c3318e85b3b46f010614
reflect: fix StructOf GC programs

They are missing a stop byte at the end.

Normally this doesn't matter, but when including a GC program
in another GC program, we strip the last byte. If that last byte
wasn't a stop byte, then we've thrown away part of the program
we actually need.

Fixes #30606

Change-Id: Ie9604beeb84f7f9442e77d31fe64c374ca132cce
Reviewed-on: https://go-review.googlesource.com/c/go/+/165857
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/reflect/type.go
test/fixedbugs/issue30606.go [new file with mode: 0644]