diff options
| author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2021-10-25 14:16:53 +0700 |
|---|---|---|
| committer | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2021-10-27 05:33:58 +0000 |
| commit | ca5f65d771bc24b9717dca615fa4ad25dcd94fad (patch) | |
| tree | 5fc7d619b7f174711a8e8e285ff1130dbdc9dac4 /src/syscall/exec_bsd.go | |
| parent | 13eccaa9902f3bb17999f1f7f14b7da39d60e0ea (diff) | |
| download | go-ca5f65d771bc24b9717dca615fa4ad25dcd94fad.tar.xz | |
cmd/compile: fix generic type handling when crawling inline body
For base generic type that is written to export file, we need to mark
all of its methods, include exported+unexported methods, as reachable,
so they can be available for instantiation if necessary. But markType
only looks for exported methods, thus causing the crash in #49143.
To fix this, we introduce new method p.markGeneric, to mark all methods
of the base generic type.
This issue has happend for a while (maybe since we add generic
import/export during go1.18 cycle), and was un-intentionally "fixed" in
CL 356254, when we agresssively call p.markEmbed(t). CL 357232 fixed
that wrong agressive behavior, thus reproduce the bug on tip.
Fixes #49143
Change-Id: Ie64574a05fffb282e9dcc8739df4378c5b6b0468
Reviewed-on: https://go-review.googlesource.com/c/go/+/358814
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/syscall/exec_bsd.go')
0 files changed, 0 insertions, 0 deletions
