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>
Showing
Please register or sign in to comment