8000 panic: runtime error: invalid memory address or nil pointer dereference · Issue #1741 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

panic: runtime error: invalid memory address or nil pointer dereference #1741

Closed

Description

@ldez
$ staticcheck -version
staticcheck 2026.2.1 (0.8.1)
package main

import "google.golang.org/protobuf/reflect/protopath"

func Walk(v protopath.Values) bool {
	return v.Values[0].Message() == nil
}
$ staticcheck .                                       
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x7b5ed2]

goroutine 1035 [running]:
honnef.co/go/tools/go/ir.(*Function).Source(...)
        /home/ldez/sources/go/pkg/mod/honnef.co/go/tools@v0.8.1/go/ir/ssa.go:1979
honnef.co/go/tools/go/ir/irutil.isTrivial(0x3a72a16f4ee0?, 0x3a72a14b8c60?)
        /home/ldez/sources/go/pkg/mod/honnef.co/go/tools@v0.8.1/go/ir/irutil/stub.go:49 +0x12
honnef.co/go/tools/go/ir/irutil.IsTrivial(...)
        /home/ldez/sources/go/pkg/mod/honnef.co/go/tools@v0.8.1/go/ir/irutil/stub.go:45
honnef.co/go/tools/staticcheck/sa4023.run(0x3a72a16f4ee0)
        /home/ldez/sources/go/pkg/mod/honnef.co/go/tools@v0.8.1/staticcheck/sa4023/sa4023.go:192 +0x717
honnef.co/go/tools/lintcmd/runner.(*analyzerRunner).do(0x3a72a1316f00, {0xede138?, 0x3a72a1990500})
        /home/ldez/sources/go/pkg/mod/honnef.co/go/tools@v0.8.1/lintcmd/runner/runner.go:989 +0x722
honnef.co/go/tools/lintcmd/runner.genericHandle({0xede138, 0x3a72a1990500}, {0xede138?, 0x3a72a1b5e140?}, 0x3a72a20104d0, 0x3a72a12222b8, 0x3a72a29bcb90)
        /home/ldez/sources/go/pkg/mod/honnef.co/go/tools@v0.8.1/lintcmd/runner/runner.go:814 +0x111
created by honnef.co/go/tools/lintcmd/runner.(*subrunner).runAnalyzers in goroutine 946
        /home/ldez/sources/go/pkg/mod/honnef.co/go/tools@v0.8.1/lintcmd/runner/runner.go:1058 +0

related to golangci/golangci-lint#6746

Activity

  1. dominikh commented on Sep 7, 2026

    @dominikh
    Owner

    This is probably golang/go#81188, but I'll investigate.

  2. shoham-utila commented on Sep 14, 2026

    @shoham-utila

    Hope you don't mind @dominikh , I gave it a shot and made a pr ( gh-1745 )
    it seems pretty limited in scope

  3. added a commit that references this issue on Oct 11, 2026
    ceddf3a
  4. added a commit that references this issue on Oct 12, 2026
    13de6a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0