-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
Go version
go1.25.5 windows/amd64
Output of go env in your module/workspace:
set AR=ar
set CC=gcc
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_ENABLED=1
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set CXX=g++
set GCCGO=gccgo
set GO111MODULE=
set GOAMD64=v1
set GOARCH=amd64
set GOAUTH=netrc
set GOBIN=
set GOCACHE=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\_z\u\AppData\Local\go-build
set GOCACHEPROG=
set GODEBUG=
set GOENV=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\_z\u\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFIPS140=off
set GOFLAGS=
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\_z\t\go-build4189164591=/tmp/go-build -gno-record-gcc-switches
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMOD=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\app\go.mod
set GOMODCACHE=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\_z\u\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\_z\u\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\GO
set GOSUMDB=sum.golang.org
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\_z\u\AppData\Roaming\go\telemetry
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\PORTABLE\DEVELOP\Go\BugProject\_internal\GO\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.25.5
set GOWORK=
set PKG_CONFIG=pkg-configWhat did you do?
quick description:
package foo
type PBar[T comparable] = *bar[T]
type bar[T comparable] struct{}
func NewBar() PBar[int] { return &bar[int]{} }
// |func (s *bar[T]) DoSomething(other *bar[T]) { //<- compiles OK
func (s *bar[T]) DoSomething(other PBar[T]) {
}Repro:
unzip app.zip
cd app
app>go build
What did you see happen?
# app
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [sync.Mutex.Lock]:
internal/sync.runtime_SemacquireMutex(0x7ff79fa18e59?, 0x0?, 0xc000152be8?)
runtime/sema.go:95 +0x25
internal/sync.(*Mutex).lockSlow(0xc000135c28)
internal/sync/mutex.go:149 +0x15d
internal/sync.(*Mutex).Lock(...)
internal/sync/mutex.go:70
sync.(*Mutex).Lock(...)
sync/mutex.go:46
cmd/compile/internal/types2.(*Named).resolve(0xc000135c00)
cmd/compile/internal/types2/named.go:176 +0x5f
cmd/compile/internal/types2.(*Named).TypeParams(...)
cmd/compile/internal/types2/named.go:322
cmd/compile/internal/types2.(*subster).typ(0xc0001532c0, {0x7ff7a06c6e68, 0xc000135c70})
cmd/compile/internal/types2/subst.go:245 +0x44b
cmd/compile/internal/types2.(*subster).typ(0xc0001532c0, {0x7ff7a06c6e18, 0xc0000333f0})
cmd/compile/internal/types2/subst.go:140 +0x17d
cmd/compile/internal/types2.(*Checker).subst(0x0, {0x0?, 0x0?, 0x0?}, {0x7ff7a06c6e18, 0xc0000333f0}, 0xc0003792f0, 0x0, 0xc000065980)
cmd/compile/internal/types2/subst.go:78 +0x1ac
cmd/compile/internal/types2.(*Checker).newAliasInstance(0x0, {0x0?, 0x160839?, 0xc0?}, 0xc0003feb80, {0xc000033430, 0x1, 0x1}, 0x0, 0xc000065980)
cmd/compile/internal/types2/alias.go:165 +0x1c5
cmd/compile/internal/types2.(*Checker).instance(0x0, {0x0, 0x0, 0x0}, {0x7ff7a06c8620, 0xc0003feb80}, {0xc000033430, 0x1, 0x1}, 0x0, ...)
cmd/compile/internal/types2/instantiate.go:150 +0x765
cmd/compile/internal/types2.Instantiate(0xc000065980, {0x7ff7a06c6e90, 0xc0003feb80}, {0xc000033430, 0x1, 0x1}, 0x0)
cmd/compile/internal/types2/instantiate.go:70 +0x326
cmd/compile/internal/importer.(*reader).doTyp(0xc000153740)
cmd/compile/internal/importer/ureader.go:258 +0xcc
cmd/compile/internal/importer.(*pkgReader).typIdx(...)
cmd/compile/internal/importer/ureader.go:231
cmd/compile/internal/importer.(*reader).typ(0xc00040e240)
cmd/compile/internal/importer/ureader.go:201 +0x1b9
cmd/compile/internal/importer.(*reader).param(0xc00040e240)
cmd/compile/internal/importer/ureader.go:365 +0x65
cmd/compile/internal/importer.(*reader).params(0xc00040e240)
cmd/compile/internal/importer/ureader.go:355 +0x74
cmd/compile/internal/importer.(*reader).signature(0xc00040e240, 0xc000135d50, {0xc000060730, 0x1, 0x1}, {0x0, 0x0, 0x0})
cmd/compile/internal/importer/ureader.go:344 +0x72
cmd/compile/internal/importer.(*reader).method(0xc00040e240)
cmd/compile/internal/importer/ureader.go:539 +0xbe
cmd/compile/internal/importer.ReadPackage.(*pkgReader).objIdx.func1.1(0xc000153a00?)
cmd/compile/internal/importer/ureader.go:454 +0xa5
cmd/compile/internal/types2.(*Named).resolve(0xc000135c00)
cmd/compile/internal/types2/named.go:215 +0xf7
cmd/compile/internal/types2.(*Named).TypeParams(...)
cmd/compile/internal/types2/named.go:322
cmd/compile/internal/types2.(*subster).typ(0xc0001540e0, {0x7ff7a06c6e68, 0xc000135c70})
cmd/compile/internal/types2/subst.go:245 +0x44b
cmd/compile/internal/types2.(*subster).typ(0xc0001540e0, {0x7ff7a06c6e18, 0xc0000333f0})
cmd/compile/internal/types2/subst.go:140 +0x17d
cmd/compile/internal/types2.(*Checker).subst(0xc00037a1e0, {0xc000378990?, 0x0?, 0x0?}, {0x7ff7a06c6e18, 0xc0000333f0}, 0xc000379110, 0x0, 0xc000065980)
cmd/compile/internal/types2/subst.go:78 +0x1ac
cmd/compile/internal/types2.(*Checker).newAliasInstance(0xc00037a1e0, {0xc000378990?, 0x160839?, 0xc0?}, 0xc0003feb80, {0xc000033400, 0x1, 0x1}, 0x0, 0xc000065980)
cmd/compile/internal/types2/alias.go:165 +0x1c5
cmd/compile/internal/types2.(*Checker).instance(0xc00037a1e0, {0xc000378990, 0x8, 0xb}, {0x7ff7a06c8620, 0xc0003feb80}, {0xc000033400, 0x1, 0x1}, 0x0, ...)
cmd/compile/internal/types2/instantiate.go:150 +0x765
cmd/compile/internal/types2.(*Checker).instantiatedType(0xc00037a1e0, {0x7ff7a06cb018, 0xc0003fdc20}, {0xc0000333c0, 0x1, 0x1}, 0x7ff7a052f72d?)
cmd/compile/internal/types2/typexpr.go:474 +0x4ad
cmd/compile/internal/types2.(*Checker).typInternal(0xc00037a1e0, {0x7ff7a06cafd0, 0xc0003f7d40}, 0x0)
cmd/compile/internal/types2/typexpr.go:294 +0x9bf
cmd/compile/internal/types2.(*Checker).definedType(0xc00037a1e0, {0x7ff7a06cafd0, 0xc0003f7d40}, 0xc000154810?)
cmd/compile/internal/types2/typexpr.go:195 +0x2f
cmd/compile/internal/types2.(*Checker).varType(0xc00037a1e0, {0x7ff7a06cafd0, 0xc0003f7d40})
cmd/compile/internal/types2/typexpr.go:159 +0x25
cmd/compile/internal/types2.(*Checker).structType(0xc00037a1e0, 0xc000378f00, 0xc000135650)
cmd/compile/internal/types2/struct.go:116 +0x22c
cmd/compile/internal/types2.(*Checker).typInternal(0xc00037a1e0, {0x7ff7a06cb450, 0xc000135650}, 0xc00040e060)
cmd/compile/internal/types2/typexpr.go:330 +0x367
cmd/compile/internal/types2.(*Checker).definedType(0xc00037a1e0, {0x7ff7a06cb450, 0xc000135650}, 0x24a93590108?)
cmd/compile/internal/types2/typexpr.go:195 +0x2f
cmd/compile/internal/types2.(*Checker).typeDecl(0xc00037a1e0, 0xc00040e060, 0xc0003f7ce0, 0x0)
cmd/compile/internal/types2/decl.go:564 +0x50c
cmd/compile/internal/types2.(*Checker).objDecl(0xc00037a1e0, {0x7ff7a06d0300, 0xc00040e060}, 0x0)
cmd/compile/internal/types2/decl.go:200 +0x973
cmd/compile/internal/types2.(*Checker).packageObjects(0xc00037a1e0)
cmd/compile/internal/types2/resolver.go:681 +0x4af
cmd/compile/internal/types2.(*Checker).checkFiles(0xc00037a1e0, {0xc0001552e0?, 0x7ff79fa2cfe5?, 0x7ff7a0d63200?})
cmd/compile/internal/types2/check.go:497 +0x285
cmd/compile/internal/types2.(*Checker).Files(0xc00000a1c8?, {0xc0001552e0?, 0x0?, 0x0?})
cmd/compile/internal/types2/check.go:460 +0x75
cmd/compile/internal/types2.(*Config).Check(0xc000135810, {0xc00000a1c8?, 0xc00000a360?}, {0xc0001552e0, 0x1, 0x1}, 0xc0003f7e00)
cmd/compile/internal/types2/api.go:488 +0x19d
cmd/compile/internal/noder.checkFiles({0x0, {0x0, 0x0}}, {0xc0000606a0, 0x1, 0x7ff7a06d8280?})
cmd/compile/internal/noder/irgen.go:95 +0x60a
cmd/compile/internal/noder.writePkgStub({0x0?, {0x0?, 0x0?}}, {0xc0000606a0, 0x1, 0x1})
cmd/compile/internal/noder/unified.go:319 +0x6a
cmd/compile/internal/noder.unified({0x0?, {0x0?, 0x0?}}, {0xc0000606a0?, 0x7ff7a044fc40?, 0xc000155928?})
cmd/compile/internal/noder/unified.go:195 +0xb6
cmd/compile/internal/noder.LoadPackage({0xc000116120, 0x1, 0xe})
cmd/compile/internal/noder/noder.go:77 +0x450
cmd/compile/internal/gc.Main(0x7ff7a0576dd8)
cmd/compile/internal/gc/main.go:208 +0xcc5
main.main()
cmd/compile/main.go:57 +0xf9
What did you expect to see?
Expected no errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
Todo