Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(104)

Issue 4927043: code review 4927043: bufio: handle a "\r\n" that straddles the buffer. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by adg
Modified:
13 years, 11 months ago
Reviewers:
CC:
r, rsc, golang-dev
Visibility:
Public.

Description

bufio: handle a "\r\n" that straddles the buffer. Fixes issue 2164.

Patch Set 1 #

Patch Set 2 : diff -r d0f1060daf9c https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r d0f1060daf9c https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r d0f1060daf9c https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r c604fc13f3af https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 6 : diff -r c604fc13f3af https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 7 : diff -r 7ba659260d89 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -7 lines) Patch
M src/pkg/bufio/bufio.go View 1 2 3 4 5 6 3 chunks +18 lines, -6 lines 0 comments Download
M src/pkg/bufio/bufio_test.go View 1 2 3 4 5 2 chunks +69 lines, -1 line 0 comments Download

Messages

Total messages: 9
adg
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 11 months ago (2011-08-22 08:07:54 UTC) #1
adg
Fixed another small issue and added more test cases.
13 years, 11 months ago (2011-08-22 08:22:01 UTC) #2
r
http://codereview.appspot.com/4927043/diff/5/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (right): http://codereview.appspot.com/4927043/diff/5/src/pkg/bufio/bufio.go#newcode302 src/pkg/bufio/bufio.go:302: if len(line) > 0 && line[len(line)-1] == '\r' { ...
13 years, 11 months ago (2011-08-23 05:14:54 UTC) #3
adg
On 23 August 2011 15:14, <r@golang.org> wrote: > can't this be made much simpler using ...
13 years, 11 months ago (2011-08-23 05:18:15 UTC) #4
r2
On Aug 23, 2011, at 3:18 PM, Andrew Gerrand wrote: > On 23 August 2011 ...
13 years, 11 months ago (2011-08-23 05:25:23 UTC) #5
adg
Okay, I've uploaded a version that forbids 1-byte buffers. On 23 August 2011 15:25, Rob ...
13 years, 11 months ago (2011-08-24 06:06:45 UTC) #6
r
LGTM http://codereview.appspot.com/4927043/diff/11001/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (right): http://codereview.appspot.com/4927043/diff/11001/src/pkg/bufio/bufio.go#newcode325 src/pkg/bufio/bufio.go:325: } a lot of reslicing going on. it's ...
13 years, 11 months ago (2011-08-24 06:18:21 UTC) #7
rsc
LGTM http://codereview.appspot.com/4927043/diff/5/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (right): http://codereview.appspot.com/4927043/diff/5/src/pkg/bufio/bufio.go#newcode327 src/pkg/bufio/bufio.go:327: panic("tried to rewind past start of buffer") Should ...
13 years, 11 months ago (2011-08-24 15:11:59 UTC) #8
adg
13 years, 11 months ago (2011-08-24 22:44:18 UTC) #9
*** Submitted as http://code.google.com/p/go/source/detail?r=465b93bb273c ***

bufio: handle a "\r\n" that straddles the buffer.

Fixes issue 2164.

R=r, rsc
CC=golang-dev
http://codereview.appspot.com/4927043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b