commit | 262d629b1592f681fef396166a671e46cdb31230 | [log] [tgz] |
---|---|---|
author | Than McIntosh <thanm@google.com> | Thu Mar 01 09:08:30 2018 -0500 |
committer | Ian Lance Taylor <iant@golang.org> | Thu Mar 01 19:55:34 2018 +0000 |
tree | 6cd2f6e5edb364cec1a288a78e4221ac372a321b | |
parent | 821960465883fbdd96568f2325f55ee4b05de1cb [diff] |
compiler: avoid crashing on bad self-referential type The compiler was crashing partway through emitting an error for a bad self-referential struct type (which refers to one of its own fields via an unsafe.Offset expression). Tweak the offset logic to check for this class of type error and exit cleanly. Fixes golang/go#24180 Change-Id: Iebf86df5eeb1a24b1c8363fdf61fef0317f084da Reviewed-on: https://go-review.googlesource.com/97855 Reviewed-by: Ian Lance Taylor <iant@golang.org>