From: Ian Lance Taylor Date: Sat, 12 Feb 2022 22:16:51 +0000 (-0800) Subject: test: add notinheap test that caused a gofrontend crash X-Git-Tag: go1.18rc1~29 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=16b1893600b4f367c6503b512832dea565f9621b;p=gostls13.git test: add notinheap test that caused a gofrontend crash Change-Id: Ie949f2131845f9f9292caff798f6933648779122 Reviewed-on: https://go-review.googlesource.com/c/go/+/385434 Trust: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Than McIntosh --- diff --git a/test/fixedbugs/bug515.go b/test/fixedbugs/bug515.go new file mode 100644 index 0000000000..186f46609a --- /dev/null +++ b/test/fixedbugs/bug515.go @@ -0,0 +1,21 @@ +// compile + +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Caused a gofrontend crash. + +package p + +//go:notinheap +type S1 struct{} + +type S2 struct { + r interface { Read([]byte) (int, error) } + s1, s2 []byte + p *S1 + n uintptr +} + +var V any = S2{}