-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/memory-corruption"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)gopls/telemetry-wins
Milestone
Description
#!stacks
"goPanicIndex" && "fingerprint.unify.func3:+8"
Issue created by stacks.
func unify(x, y sexpr) bool {
// maxTypeParam returns the maximum type parameter index in x.
var maxTypeParam func(x sexpr) int
maxTypeParam = func(x sexpr) int {...}
...
yBindings := make([]*sexpr, maxTypeParam(y)+1)
for i := range len(yBindings) {
yBindings[i] = new(sexpr)
}
// bind sets binding b to s from bindings if it does not occur in s.
bind := func(b *sexpr, s sexpr, bindings []*sexpr) bool {
...
var uni func(x, y sexpr) bool
uni = func(x, y sexpr) bool {
var bx, by *sexpr
ix := typeParamIndex(x)
if ix >= 0 {
bx = xBindings[ix]
}
iy := typeParamIndex(y)
if iy >= 0 {
by = yBindings[iy] // OOB index panic
This stack FSaUqg
was reported by telemetry:
crash/crash
runtime.gopanic:+69,+0x167
runtime.goPanicIndex:+2,+0x73
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+8,+0x79a
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+45,+0x649
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+54,+0x687
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+33,+0x4c1
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+45,+0x649
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+54,+0x687
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+54,+0x687
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+45,+0x649
golang.org/x/tools/gopls/internal/util/fingerprint.unify.func3:+54,+0x687
golang.org/x/tools/gopls/internal/util/fingerprint.unify:+108,+0x235
golang.org/x/tools/gopls/internal/util/fingerprint.Matches:=64,+0x10d
golang.org/x/tools/gopls/internal/cache/methodsets.implements.func1:=228,+0xe0
slices.IndexFunc[...]:=109,+0x73
slices.ContainsFunc[...]:=124,+0x4e
golang.org/x/tools/gopls/internal/cache/methodsets.implements:+40,+0x3c
golang.org/x/tools/gopls/internal/cache/methodsets.(*Index).Search:+10,+0xac
golang.org/x/tools/gopls/internal/golang.implementationsMsets.func2:+1,+0x6f
golang.org/x/sync/errgroup.(*Group).Go.func1:+15,+0x4f
golang.org/x/tools/[email protected] go1.24.6 linux/amd64 vscode (1)
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.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/memory-corruption"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)gopls/telemetry-wins