-
Notifications
You must be signed in to change notification settings - Fork 18k
bufio: panic in ReadSlice #4276
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
Labels
Milestone
Comments
At first I thought this was the wrapped io.Reader returning something suspicious that confused bufio, but I imagine this is just buggy concurrent access. Owner changed to @bradfitz. Status changed to Accepted. |
I have a case where I can reproduce this crash. In this case the caller of bufio.ReadSlice is the memcached package but it's a similar problem. I get an out of bounds error on line 260 of bufio.go. Right now I get the crash in a very large program under heavy load. Will attempt to isolate a small test case. |
I had a similar problem which was solved by https://code.google.com/p/go/source/detail?r=cd3ad8805953999b6de7de7b3f043bd6bd1b4e32 Check that n in that bufio method is not negative. |
Owner changed to @davecheney. Status changed to WaitingForReply. |
I'm sorry, I meant this change https://code.google.com/p/go/source/detail?r=03a6b8c9c396b3de2c2c755362416b32ee875400. The root cause was a call to an io.Reader was returning the values -1, err, resulting in code like this http://play.golang.org/p/9CVH1WDGxo |
This issue was closed by revision f0d9ccb. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: