Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

fix: panic of nil pointer dereference "pass.TypesInfo" and "package check" #13

Merged
merged 1 commit into from
May 13, 2022

Conversation

ldez
Copy link
Contributor

@ldez ldez commented May 12, 2022

$ go vet -vettool=$(which execinquery) ./...

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x61d0c2]

goroutine 18 [running]:
go/types.(*Package).Path(...)
        /home/ldez/.gvm/gos/go1.18.1/src/go/types/package.go:31
github.com/lufeee/execinquery.linter.run.func1({0x6d8218?, 0xc000132700})
        /home/ldez/sources/go/src/github.com/lufeee/execinquery/execinquery.go:56 +0xc2
golang.org/x/tools/go/ast/inspector.(*Inspector).Preorder(0xc0002a96e0, {0xc00009ac80?, 0x1?, 0x7f18bc19c5b8?}, 0xc00009ac90)
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.1.9/go/ast/inspector/inspector.go:77 +0x9a
github.com/lufeee/execinquery.linter.run({0xc0000de5a0?, 0xc0000de6e0?}, 0xc0002b5ad0)
        /home/ldez/sources/go/src/github.com/lufeee/execinquery/execinquery.go:44 +0xd5
golang.org/x/tools/go/analysis/unitchecker.run.func5.1()
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.1.9/go/analysis/unitchecker/unitchecker.go:355 +0x82e
sync.(*Once).doSlow(0x0?, 0x0?)
        /home/ldez/.gvm/gos/go1.18.1/src/sync/once.go:68 +0xc2
sync.(*Once).Do(...)
        /home/ldez/.gvm/gos/go1.18.1/src/sync/once.go:59
golang.org/x/tools/go/analysis/unitchecker.run.func5(0x81f980?)
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.1.9/go/analysis/unitchecker/unitchecker.go:307 +0x1a5
golang.org/x/tools/go/analysis/unitchecker.run.func6.1(0x0?)
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.1.9/go/analysis/unitchecker/unitchecker.go:367 +0x29
created by golang.org/x/tools/go/analysis/unitchecker.run.func6
        /home/ldez/sources/go/pkg/mod/golang.org/x/tools@v0.1.9/go/analysis/unitchecker/unitchecker.go:366 +0x47

@1uf3
Copy link
Owner

1uf3 commented May 13, 2022

thanks for fixing

@1uf3 1uf3 changed the title fix: panic fix: panic of nil pointer dereference "pass.TypesInfo" and "package check" May 13, 2022
@1uf3 1uf3 merged commit f1b0b03 into 1uf3:main May 13, 2022
@ldez ldez deleted the fix/panic branch May 13, 2022 21:12
@ldez
Copy link
Contributor Author

ldez commented May 13, 2022

@lufeee can you create a new release?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants