Comments (2)
Same problem.
Strangely, this issue occurred randomly only once.
After running golangci-lint again, I couldn't reproduce the issue.
from bodyclose.
I'm having the same issue with bodyclose under golangci-lint. In case my stack trace is useful somehow:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x9b883f]
goroutine 20790 [running]:
github.com/timakin/bodyclose/passes/bodyclose.(*runner).run(0xc00016c240, 0xc0d5b72d20, 0x10, 0xd6bb00, 0xa5dc4d767ca7de01, 0xc08dc478c0)
/go/pkg/mod/github.com/timakin/[email protected]/passes/bodyclose/bodyclose.go:57 +0x1af
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.(*action).execOnce(0xc004107180)
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/checker/checker.go:382 +0x68a
sync.(*Once).Do(0xc004107180, 0xc0012ee790)
/usr/local/go/src/sync/once.go:44 +0xb3
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.(*action).exec(0xc004107180)
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/checker/checker.go:303 +0x50
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.execAll.func1(0xc004107180)
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/checker/checker.go:291 +0x34
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis/checker.execAll
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/checker/checker.go:297 +0x11b
This is happening intermittently against a large internal codebase, and I haven't been able to carve out a useful test case.
from bodyclose.
Related Issues (20)
- Analyzer for http.Request
- False positive: if function returns io.ReadCloser
- False positive with a retry for
- False positive with body close inside separate function HOT 11
- what zbout joining revive?
- Is this project still maintained? I want to add some new features to pr
- global resp cause check panic
- SSA and generics (go1.18) HOT 5
- false positive when close is in another package HOT 1
- False Positive when http.Response from a function HOT 2
- Check both closing and consuming the response body
- Bump golang.org/x/tools to v0.7.0 (as minimum) and make new tag
- False positive when using `httptest.NewRecorder()`
- bodyclose fails unexpected HOT 1
- conflicts with errcheck?
- Close in another function's defer function is not handled correctly
- False positive when using `http.NewResponseController(rw)`
- Generated code by ent cause check panic HOT 1
- Request: tag a version
- normalize CLI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bodyclose.