diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-06-04 19:10:05 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-06-04 19:10:05 +0000 |
commit | f0ebf6e3229d88be4bc8d13b219327a7a073df83 (patch) | |
tree | bac6ab9a7cb11017d4e4ab53577eebb573d2e3dc /gcc/fibonacci_heap.h | |
parent | e68086c43226ee8ada8ac71365f571a3d3ad2a0a (diff) | |
download | gcc-f0ebf6e3229d88be4bc8d13b219327a7a073df83.zip gcc-f0ebf6e3229d88be4bc8d13b219327a7a073df83.tar.gz gcc-f0ebf6e3229d88be4bc8d13b219327a7a073df83.tar.bz2 |
compiler: fix crashes on cyclic var/type references
This patch fixes type traversal to avoid compiler crashes for test
cases where a type T includes an expression that refers back to the
type without actually explicitly mentioning T. Examples include
var x [uintptr(unsafe.Sizeof(&x))]byte
var a [len(a)]int
The fix involves expanding the set of types that the traversal code
"remembers" (to avoid cycles) to include array types, and introducing an
additional guard in Builtin_call_expression::do_is_constant to catch
cyclic type constructs.
Fixes golang/go#25299
Fixes golang/go#25679
Fixes golang/go#25315
Fixes golang/go#25680
Reviewed-on: https://go-review.googlesource.com/115796
From-SVN: r261168
Diffstat (limited to 'gcc/fibonacci_heap.h')
0 files changed, 0 insertions, 0 deletions