Skip to content

x/tools/gopls: SEGV in string comparison in mapaccess #76159

@adonovan

Description

@adonovan
#!stacks
"sigpanic" && "memequal" && "getWithoutKeySmallFastStr"

Issue created by stacks.

The memequal(a, b) call panics reading from b. More memory corruption.

This stack fJSOUQ was reported by telemetry:

golang.org/x/tools/gopls@v0.20.0 go1.25.1 darwin/arm64 gopls.client=other,vscode (1)

Use this command to reproduce the executable:
(HOME=$(mktemp -d); GOOS=darwin GOARCH=arm64 GOTOOLCHAIN=go1.25.1 go install golang.org/x/tools/gopls@v0.20.0 && find $HOME/go/bin -type f)
To disassemble: go tool objdump exe | less

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions