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

bufio: Scanner should error out if empty token at EOF keeps happening #9020

Closed
robpike opened this issue Oct 29, 2014 · 5 comments
Closed

bufio: Scanner should error out if empty token at EOF keeps happening #9020

robpike opened this issue Oct 29, 2014 · 5 comments
Milestone

Comments

@robpike
Copy link
Contributor

robpike commented Oct 29, 2014

from rsc:

The most common failure mode for a bad split function is an infinite loop
generating empty tokens at EOF. Programs that used to 'work' now hang. I saw
this a couple times updating Google code. Should we make the Scanner
implementation count empty tokens at EOF and panic if it sees 100 or something
like that?
@robpike
Copy link
Contributor Author

robpike commented Oct 29, 2014

Comment 1:

Labels changed: added release-go1.4.

Owner changed to @robpike.

@gopherbot
Copy link

Comment 2:

CL https://golang.org/cl/169970043 mentions this issue.

@robpike
Copy link
Contributor Author

robpike commented Nov 5, 2014

Comment 3:

This issue was closed by revision 590f528.

Status changed to Fixed.

@gopherbot
Copy link

Comment 4:

CL https://golang.org/cl/170030043 mentions this issue.

@rsc
Copy link
Contributor

rsc commented Nov 6, 2014

Comment 5:

This issue was closed by revision 2d0db8e.

@robpike robpike self-assigned this Nov 6, 2014
@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
The new rules for split functions mean that we are exposed
to the common bug of a function that loops forever at EOF.
Pick these off by shutting down the scanner if too many
consecutive empty tokens are delivered.

Fixes golang#9020.

LGTM=rsc, adg
R=golang-codereviews, rsc, adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/169970043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
Fixes golang#9020.

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/170030043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
The new rules for split functions mean that we are exposed
to the common bug of a function that loops forever at EOF.
Pick these off by shutting down the scanner if too many
consecutive empty tokens are delivered.

Fixes golang#9020.

LGTM=rsc, adg
R=golang-codereviews, rsc, adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/169970043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
Fixes golang#9020.

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/170030043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
The new rules for split functions mean that we are exposed
to the common bug of a function that loops forever at EOF.
Pick these off by shutting down the scanner if too many
consecutive empty tokens are delivered.

Fixes golang#9020.

LGTM=rsc, adg
R=golang-codereviews, rsc, adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/169970043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
Fixes golang#9020.

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/170030043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 20, 2018
The new rules for split functions mean that we are exposed
to the common bug of a function that loops forever at EOF.
Pick these off by shutting down the scanner if too many
consecutive empty tokens are delivered.

Fixes golang#9020.

LGTM=rsc, adg
R=golang-codereviews, rsc, adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/169970043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 20, 2018
Fixes golang#9020.

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/170030043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
The new rules for split functions mean that we are exposed
to the common bug of a function that loops forever at EOF.
Pick these off by shutting down the scanner if too many
consecutive empty tokens are delivered.

Fixes golang#9020.

LGTM=rsc, adg
R=golang-codereviews, rsc, adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/169970043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
Fixes golang#9020.

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/170030043
@rsc rsc unassigned robpike Jun 23, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants