Skip to content

x/tools/gopls: ChangeSignature: OOB panic in inlineCall (FuncType.Params inconsistent with Signature) #73912

Open
@adonovan

Description

@adonovan
#!stacks
"goPanicIndex" && "inline.(*state).inlineCall:+341"

Issue created by stacks.

Likely an ill-typed input:

		var types []ast.Expr
		for _, field := range calleeDecl.Type.Params.List {
			if field.Names == nil {
				types = append(types, field.Type)
			} else {
				for range field.Names {
					types = append(types, field.Type)
				}
			}
		}

		for i := 0; i < sig.Params().Len(); i++ {
			params = append(params, &parameter{
				obj:       sig.Params().At(i),
				fieldType: types[i], <------- panic
				info:      callee.Params[len(params)],
			})
		}

(Similar to #73913, but a distinct crash.)

This stack kWCXUg was reported by telemetry:

golang.org/x/tools/[email protected] go1.24.0 darwin/arm64 neovim,vscode (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone 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.goplsIssues related to the Go language server, gopls.gopls/telemetry-wins

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions