commit | 0d64279c01a37b2579c0c62ca4f2c3e3f81de07c | [log] [tgz] |
---|---|---|
author | Cherry Zhang <cherryyz@google.com> | Fri Jan 11 10:37:56 2019 -0500 |
committer | Ian Lance Taylor <iant@golang.org> | Fri Jan 11 23:16:00 2019 +0000 |
tree | fad9c0b6c193c131afb3a194a5578686c5afb424 | |
parent | 960637781ca9546ea2db913e48afd7eccbdadfa9 [diff] |
compiler: pad structs ending with zero-sized field For a struct with zero-sized last field, the address of the field falls out of the object boundary, which confuses the garbage collector. Pad an extra byte in this case. Change-Id: I44c2b52f0353eff81725fe18084a229b44e0c344 Reviewed-on: https://go-review.googlesource.com/c/157557 Reviewed-by: Ian Lance Taylor <iant@golang.org>