]> Cypherpunks repositories - gostls13.git/commit
reflect: fix bucketOf to only look at ptrdata entries in gcdata
authorIan Lance Taylor <iant@golang.org>
Thu, 16 Feb 2017 22:20:24 +0000 (14:20 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 22 Feb 2017 02:19:48 +0000 (02:19 +0000)
commitb5e51943063a1d78045f0c3ce6c87b424795e643
tree7489a9a43baf54a675b03bbf191607f966b20233
parentdb6e27c38d20cdd6af205bbf99c1b1d3327e6c6f
reflect: fix bucketOf to only look at ptrdata entries in gcdata

The gcdata field only records ptrdata entries, not size entries.

Also fix an obsolete comment: the enforced limit on pointer maps is
now 2048 bytes, not 16 bytes.

I wasn't able to contruct a test case for this. It would require
building a type whose size is greater than 64 bytes but less than 128
bytes, with at least one pointer in first 64 bytes but no pointers
after the first 64 bytes, such that the linker arranges for the one
byte gcbits value to be immediately followed by a non-zero byte.

Change-Id: I9118d3e4ec6f07fd18b72f621c1e5f4fdfe5f80b
Reviewed-on: https://go-review.googlesource.com/37142
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/reflect/type.go