Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

x/tools/gopls: impossible nil deref in reflect package #75207

Open
Labels
BugReportIssues 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. ToolsThis label describes issues relating to any tools in the x/tools repository. goplsIssues related to the Go language server, gopls. gopls/memory-corruption"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW) gopls/telemetry-wins
Milestone
@adonovan

Description

#!stacks
"sigpanic" && "reflect.(*rtype).common" && "reflect.(*rtype).Implements"

Issue created by stacks.

func (t *rtype) Implements(u Type) bool {
	if u == nil {
		panic("reflect: nil type passed to Type.Implements")
	}
	if u.Kind() != Interface {
		panic("reflect: non-interface type passed to Type.Implements")
	}
	return implements(u.common(), t.common()) // <--- panics because u is nil (or SP is corrupt), but u cannot be nil
}
func (t *rtype) common() *abi.Type {
	return &t.t // <--- panic
}

This stack 2veB9A was reported by telemetry:

golang.org/x/tools/gopls@v0.19.1 go1.24.4 darwin/arm64 other,vscode (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues 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. ToolsThis label describes issues relating to any tools in the x/tools repository. goplsIssues related to the Go language server, gopls. gopls/memory-corruption"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW) gopls/telemetry-wins

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /