Repository: go
Issue: encoding/xml: stack overflow on marshaling a type embedding itself with XMLName
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
go version go1.19 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/sedyh/.cache/go-build"
GOENV="/home/sedyh/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/sedyh/.local/share/go/workspace/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/sedyh/.local/share/go/workspace"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/sedyh/sdk/go1.19"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/sedyh/sdk/go1.19/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/sedyh/projects/go/xml-creator/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build28255731=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

Basic example:

```go
package main

import (
	"encoding/xml"
	"log"
)

func main() {
	data, err := xml.Marshal(&Test{Test: &Test{}})
	if err != nil {
		log.Fatal(err)
	}
        log.Println("Data is:", string(data))
}

type Test struct {
	XMLName xml.Name `xml:"test"`
	*Test
}
```

The same example run through go.dev/play will cause the program to exit instantly.
https://go.dev/play/p/TUL3IEqwvsn

### What did you expect to see?

```go
Data is: <test><test></test></test>
```

### What did you see instead?

<details><summary><code>go env</code> On my machine</summary><br><pre>
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc0200e03e0 stack=[0xc0200e0000, 0xc0400e0000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x4bc917?, 0x54fd00?})
        /home/sedyh/sdk/go1.19/src/runtime/panic.go:1047 +0x5d fp=0xc00005be10 sp=0xc00005bde0 pc=0x43309d
runtime.newstack()
        /home/sedyh/sdk/go1.19/src/runtime/stack.go:1103 +0x5cc fp=0xc00005bfc8 sp=0xc00005be10 pc=0x44a82c
runtime.morestack()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:570 +0x8b fp=0xc00005bfd0 sp=0xc00005bfc8 pc=0x45d22b

goroutine 1 [running]:
runtime.heapBitsSetType(0xc00972c1a0?, 0x10?, 0x10?, 0x4a8360?)
        /home/sedyh/sdk/go1.19/src/runtime/mbitmap.go:844 +0xbac fp=0xc0200e03f0 sp=0xc0200e03e8 pc=0x41414c
runtime.mallocgc(0x10, 0x4a8360, 0x1)
        /home/sedyh/sdk/go1.19/src/runtime/malloc.go:1050 +0x64d fp=0xc0200e0468 sp=0xc0200e03f0 pc=0x40c8ad
runtime.makeslice(0x4a3b1c?, 0xc0200e04e0?, 0x4ba83c?)
        /home/sedyh/sdk/go1.19/src/runtime/slice.go:103 +0x52 fp=0xc0200e0490 sp=0xc0200e0468 pc=0x448152
strings.genSplit({0x4a3b1c, 0x4}, {0x4ba83c, 0x1}, 0x0, 0x6?)
        /home/sedyh/sdk/go1.19/src/strings/strings.go:250 +0x85 fp=0xc0200e04f0 sp=0xc0200e0490 pc=0x46bd05
strings.Split(...)
        /home/sedyh/sdk/go1.19/src/strings/strings.go:308
encoding/xml.structFieldInfo({0x4df9a0?, 0x4ae7c0}, 0xc0200e07f8)
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:123 +0x136 fp=0xc0200e0660 sp=0xc0200e04f0 pc=0x49acf6
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:91 +0x34a fp=0xc0200e0870 sp=0xc0200e0660 pc=0x49a8ca
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e0a80 sp=0xc0200e0870 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e0c90 sp=0xc0200e0a80 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e0ea0 sp=0xc0200e0c90 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e10b0 sp=0xc0200e0ea0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e12c0 sp=0xc0200e10b0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e14d0 sp=0xc0200e12c0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e16e0 sp=0xc0200e14d0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e18f0 sp=0xc0200e16e0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e1b00 sp=0xc0200e18f0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e1d10 sp=0xc0200e1b00 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e1f20 sp=0xc0200e1d10 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e2130 sp=0xc0200e1f20 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e2340 sp=0xc0200e2130 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e2550 sp=0xc0200e2340 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e2760 sp=0xc0200e2550 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e2970 sp=0xc0200e2760 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e2b80 sp=0xc0200e2970 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e2d90 sp=0xc0200e2b80 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e2fa0 sp=0xc0200e2d90 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e31b0 sp=0xc0200e2fa0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e33c0 sp=0xc0200e31b0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e35d0 sp=0xc0200e33c0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e37e0 sp=0xc0200e35d0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e39f0 sp=0xc0200e37e0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e3c00 sp=0xc0200e39f0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e3e10 sp=0xc0200e3c00 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e4020 sp=0xc0200e3e10 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e4230 sp=0xc0200e4020 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e4440 sp=0xc0200e4230 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e4650 sp=0xc0200e4440 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e4860 sp=0xc0200e4650 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e4a70 sp=0xc0200e4860 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e4c80 sp=0xc0200e4a70 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e4e90 sp=0xc0200e4c80 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e50a0 sp=0xc0200e4e90 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e52b0 sp=0xc0200e50a0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e54c0 sp=0xc0200e52b0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e56d0 sp=0xc0200e54c0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e58e0 sp=0xc0200e56d0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e5af0 sp=0xc0200e58e0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e5d00 sp=0xc0200e5af0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e5f10 sp=0xc0200e5d00 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e6120 sp=0xc0200e5f10 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e6330 sp=0xc0200e6120 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e6540 sp=0xc0200e6330 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e6750 sp=0xc0200e6540 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e6960 sp=0xc0200e6750 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e6b70 sp=0xc0200e6960 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e6d80 sp=0xc0200e6b70 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e6f90 sp=0xc0200e6d80 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e71a0 sp=0xc0200e6f90 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e73b0 sp=0xc0200e71a0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e75c0 sp=0xc0200e73b0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e77d0 sp=0xc0200e75c0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e79e0 sp=0xc0200e77d0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e7bf0 sp=0xc0200e79e0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e7e00 sp=0xc0200e7bf0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e8010 sp=0xc0200e7e00 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e8220 sp=0xc0200e8010 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e8430 sp=0xc0200e8220 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e8640 sp=0xc0200e8430 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e8850 sp=0xc0200e8640 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e8a60 sp=0xc0200e8850 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e8c70 sp=0xc0200e8a60 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e8e80 sp=0xc0200e8c70 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e9090 sp=0xc0200e8e80 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e92a0 sp=0xc0200e9090 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e94b0 sp=0xc0200e92a0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e96c0 sp=0xc0200e94b0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e98d0 sp=0xc0200e96c0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e9ae0 sp=0xc0200e98d0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e9cf0 sp=0xc0200e9ae0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200e9f00 sp=0xc0200e9cf0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ea110 sp=0xc0200e9f00 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ea320 sp=0xc0200ea110 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ea530 sp=0xc0200ea320 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ea740 sp=0xc0200ea530 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ea950 sp=0xc0200ea740 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200eab60 sp=0xc0200ea950 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ead70 sp=0xc0200eab60 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200eaf80 sp=0xc0200ead70 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200eb190 sp=0xc0200eaf80 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200eb3a0 sp=0xc0200eb190 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200eb5b0 sp=0xc0200eb3a0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200eb7c0 sp=0xc0200eb5b0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200eb9d0 sp=0xc0200eb7c0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ebbe0 sp=0xc0200eb9d0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ebdf0 sp=0xc0200ebbe0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ec000 sp=0xc0200ebdf0 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ec210 sp=0xc0200ec000 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ec420 sp=0xc0200ec210 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ec630 sp=0xc0200ec420 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200ec840 sp=0xc0200ec630 pc=0x49a971
encoding/xml.getTypeInfo({0x4df9a0?, 0x4ae7c0})
        /home/sedyh/sdk/go1.19/src/encoding/xml/typeinfo.go:74 +0x3f1 fp=0xc0200eca50 sp=0xc0200ec840 pc=0x49a971

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00004cfb0 sp=0xc00004cf90 pc=0x435cb6
runtime.goparkunlock(...)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:369
runtime.forcegchelper()
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:302 +0xad fp=0xc00004cfe0 sp=0xc00004cfb0 pc=0x435b4d
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00004cfe8 sp=0xc00004cfe0 pc=0x45f1c1
created by runtime.init.6
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:290 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00004d790 sp=0xc00004d770 pc=0x435cb6
runtime.goparkunlock(...)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/mgcsweep.go:297 +0xd7 fp=0xc00004d7c8 sp=0xc00004d790 pc=0x422e37
runtime.gcenable.func1()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:178 +0x26 fp=0xc00004d7e0 sp=0xc00004d7c8 pc=0x417ca6
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00004d7e8 sp=0xc00004d7e0 pc=0x45f1c1
created by runtime.gcenable
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x146ae09f1b1d?, 0x789d97?, 0x0?, 0x0?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00004df70 sp=0xc00004df50 pc=0x435cb6
runtime.goparkunlock(...)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x565160)
        /home/sedyh/sdk/go1.19/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc00004dfa0 sp=0xc00004df70 pc=0x420e93
runtime.bgscavenge(0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/mgcscavenge.go:622 +0x65 fp=0xc00004dfc8 sp=0xc00004dfa0 pc=0x421485
runtime.gcenable.func2()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:179 +0x26 fp=0xc00004dfe0 sp=0xc00004dfc8 pc=0x417c46
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00004dfe8 sp=0xc00004dfe0 pc=0x45f1c1
created by runtime.gcenable
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:179 +0xaa

goroutine 17 [finalizer wait]:
runtime.gopark(0x0?, 0xc00004c670?, 0x4b?, 0x51?, 0xc00004c770?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00004c628 sp=0xc00004c608 pc=0x435cb6
runtime.goparkunlock(...)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:369
runtime.runfinq()
        /home/sedyh/sdk/go1.19/src/runtime/mfinal.go:180 +0x10f fp=0xc00004c7e0 sp=0xc00004c628 pc=0x416daf
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00004c7e8 sp=0xc00004c7e0 pc=0x45f1c1
created by runtime.createfing
        /home/sedyh/sdk/go1.19/src/runtime/mfinal.go:157 +0x45

goroutine 18 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000048750 sp=0xc000048730 pc=0x435cb6
runtime.gcBgMarkWorker()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000487e0 sp=0xc000048750 pc=0x419bf1
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000487e8 sp=0xc0000487e0 pc=0x45f1c1
created by runtime.gcBgMarkStartWorkers
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1159 +0x25

goroutine 5 [GC worker (idle)]:
runtime.gopark(0x146af9b78d31?, 0x0?, 0x0?, 0x0?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00004e750 sp=0xc00004e730 pc=0x435cb6
runtime.gcBgMarkWorker()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc00004e7e0 sp=0xc00004e750 pc=0x419bf1
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00004e7e8 sp=0xc00004e7e0 pc=0x45f1c1
created by runtime.gcBgMarkStartWorkers
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1159 +0x25

goroutine 33 [GC worker (idle)]:
runtime.gopark(0x594540?, 0x1?, 0x6b?, 0xe8?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000492750 sp=0xc000492730 pc=0x435cb6
runtime.gcBgMarkWorker()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc0004927e0 sp=0xc000492750 pc=0x419bf1
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0004927e8 sp=0xc0004927e0 pc=0x45f1c1
created by runtime.gcBgMarkStartWorkers
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1159 +0x25

goroutine 34 [GC worker (idle)]:
runtime.gopark(0x146af9b770a8?, 0x0?, 0x0?, 0x0?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000492f50 sp=0xc000492f30 pc=0x435cb6
runtime.gcBgMarkWorker()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc000492fe0 sp=0xc000492f50 pc=0x419bf1
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000492fe8 sp=0xc000492fe0 pc=0x45f1c1
created by runtime.gcBgMarkStartWorkers
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1159 +0x25

goroutine 35 [GC worker (idle)]:
runtime.gopark(0x146af9b69e82?, 0x1?, 0xff?, 0x20?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000493750 sp=0xc000493730 pc=0x435cb6
runtime.gcBgMarkWorker()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc0004937e0 sp=0xc000493750 pc=0x419bf1
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0004937e8 sp=0xc0004937e0 pc=0x45f1c1
created by runtime.gcBgMarkStartWorkers
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1159 +0x25

goroutine 36 [GC worker (idle)]:
runtime.gopark(0x146af9b69c86?, 0x0?, 0x0?, 0x0?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000493f50 sp=0xc000493f30 pc=0x435cb6
runtime.gcBgMarkWorker()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc000493fe0 sp=0xc000493f50 pc=0x419bf1
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000493fe8 sp=0xc000493fe0 pc=0x45f1c1
created by runtime.gcBgMarkStartWorkers
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1159 +0x25

goroutine 49 [GC worker (idle)]:
runtime.gopark(0x146af9b69e01?, 0x3?, 0x76?, 0x34?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc00048e750 sp=0xc00048e730 pc=0x435cb6
runtime.gcBgMarkWorker()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc00048e7e0 sp=0xc00048e750 pc=0x419bf1
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00048e7e8 sp=0xc00048e7e0 pc=0x45f1c1
created by runtime.gcBgMarkStartWorkers
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1159 +0x25

goroutine 19 [GC worker (idle)]:
runtime.gopark(0x146af9b69e7f?, 0x1?, 0xba?, 0x55?, 0x0?)
        /home/sedyh/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000048f50 sp=0xc000048f30 pc=0x435cb6
runtime.gcBgMarkWorker()
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1235 +0xf1 fp=0xc000048fe0 sp=0xc000048f50 pc=0x419bf1
runtime.goexit()
        /home/sedyh/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000048fe8 sp=0xc000048fe0 pc=0x45f1c1
created by runtime.gcBgMarkStartWorkers
        /home/sedyh/sdk/go1.19/src/runtime/mgc.go:1159 +0x25

Process finished with the exit code 2
</pre></details>

<details><summary><code>go env</code> On go.dev/play</summary><br><pre>
Program exited.
</pre></details>