Skip to content
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

SIGSEGV incoming #537

Closed
deputinizer opened this issue May 8, 2022 · 3 comments
Closed

SIGSEGV incoming #537

deputinizer opened this issue May 8, 2022 · 3 comments

Comments

@deputinizer
Copy link
Contributor

deputinizer commented May 8, 2022

This will cause memory issues. Nil pointer dereference probably

req := fasthttp.AcquireRequest()
fasthttp.ReleaseRequest(req)
// using req later

https://github.com/Arriven/db1000n/blob/12b3db0d757d3bdcb83ff3b893555c6db6870a98/src/job/http.go#L149

@arriven
Copy link
Owner

arriven commented May 8, 2022

ah, right. It doesn't cause SIGSEGV as it just returns the request to the pool, but it probably reuses it between different goroutines making a mess anyway

@deputinizer
Copy link
Contributor Author

It caused SIGSEGV in stoppropaganda 🤣

@arriven
Copy link
Owner

arriven commented May 8, 2022

hmm, I've quickly run through the source of that pool and I'm not sure I see anything that could lead to a crash except race detection. Anyway that's not a good code and I fixed it already

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

No branches or pull requests

2 participants