Skip to content

fix: panic. #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

fix: panic. #22

wants to merge 1 commit into from

Conversation

ldez
Copy link
Contributor

@ldez ldez commented Sep 24, 2019

golangci/golangci-lint#733

WARN [linters context] Panic: bodyclose: package "phttp" (isInitialPkg: true, needAnalyzeSource: true): runtime error: invalid memory address or nil pointer dereference: goroutine 47307 [running]:
runtime/debug.Stack(0xf57075, 0x3c, 0xc00167d8b8)
        /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1(0xc034cff740)
        /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner.go:404 +0x1af
panic(0xd9a0e0, 0x1720290)
        /usr/local/go/src/runtime/panic.go:679 +0x1b2
go/types.(*object).Name(...)
        /usr/local/go/src/go/types/object.go:133
github.com/timakin/bodyclose/passes/bodyclose.(*runner).calledInFunc(0xc00167dc78, 0xc0b624d7c0, 0xc0b6512800, 0x10ae3a0)
        /Users/denis/go/src/github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go:328 +0x284
github.com/timakin/bodyclose/passes/bodyclose.(*runner).isopen(0xc00167dc78, 0xc0b6476580, 0x14, 0x0)
        /Users/denis/go/src/github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go:148 +0x555
github.com/timakin/bodyclose/passes/bodyclose.runner.run(0xc0a41bfc20, 0x10b9cc0, 0xc020a70910, 0xc0b6fc58e0, 0x10b9d60, 0xc020aea690, 0xc003d10c80, 0xc0b6f71a10, 0xc0a41bfc20, 0xe41140933e432942, ...)
        /Users/denis/go/src/github.com/golangci/golangci-lint/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go:102 +0x589
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc034cff740)
        /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner.go:495 +0x87a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc034cff740)
        /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner.go:407 +0x5b
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func3(0xc09f24a800, 0xc034cff740)
        /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner.go:961 +0x69
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
        /Users/denis/go/src/github.com/golangci/golangci-lint/pkg/g

@tpounds
Copy link

tpounds commented Sep 24, 2019

@ldez It looks like this pr contains a dupe of the change @jirfag included in #20.

see: https://github.com/timakin/bodyclose/pull/20/files#diff-8de73591763edb2daddc2ff215918855L328

@ldez
Copy link
Contributor Author

ldez commented Sep 24, 2019

@jirfag merge a PR inside his PR after my PR.

@ldez
Copy link
Contributor Author

ldez commented Sep 24, 2019

close in favor of #20

@ldez ldez closed this Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants