mirror of
https://github.com/golang/go
synced 2024-11-18 02:44:48 -07:00
e49627d355
Prevent a crash if the same type in two plugins had a recursive definition, either by referring to a pointer to itself or a map existing with the type as a value type (which creates a recursive definition through the overflow bucket type). Fixes #19258 Change-Id: Iac1cbda4c5b6e8edd5e6859a4d5da3bad539a9c6 Reviewed-on: https://go-review.googlesource.com/40292 Run-TryBot: Todd Neal <todd@tneal.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
22 lines
347 B
Go
22 lines
347 B
Go
// Copyright 2016 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.
|
|
|
|
package main
|
|
|
|
// // No C code required.
|
|
import "C"
|
|
|
|
func FuncInt() int { return 2 }
|
|
|
|
func FuncRecursive() X { return X{} }
|
|
|
|
type Y struct {
|
|
X *X
|
|
}
|
|
type X struct {
|
|
Y Y
|
|
}
|
|
|
|
func main() {}
|