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

Issue 142710043: code review 142710043: encoding/gob: error rather than panic when decoding eno... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 7 months ago by r
Modified:
9 years, 7 months ago
Reviewers:
ruiu, dave
CC:
golang-codereviews, ruiu
Visibility:
Public.

Description

encoding/gob: error rather than panic when decoding enormous slices Fixes issue 8084.

Patch Set 1 #

Total comments: 3

Patch Set 2 : diff -r 65257d85e6697175ebeaa6cc8ee9738f39ec9a27 https://code.google.com/p/go #

Patch Set 3 : diff -r 65257d85e6697175ebeaa6cc8ee9738f39ec9a27 https://code.google.com/p/go #

Patch Set 4 : diff -r 65257d85e6697175ebeaa6cc8ee9738f39ec9a27 https://code.google.com/p/go #

Patch Set 5 : diff -r 65257d85e6697175ebeaa6cc8ee9738f39ec9a27 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -4 lines) Patch
M src/encoding/gob/decode.go View 1 2 3 2 chunks +11 lines, -1 line 0 comments Download
M src/encoding/gob/decoder.go View 2 chunks +6 lines, -3 lines 0 comments Download
M src/encoding/gob/encoder_test.go View 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 10
r
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
9 years, 7 months ago (2014-09-25 21:09:59 UTC) #1
ruiu
https://codereview.appspot.com/142710043/diff/1/src/encoding/gob/decode.go File src/encoding/gob/decode.go (right): https://codereview.appspot.com/142710043/diff/1/src/encoding/gob/decode.go#newcode548 src/encoding/gob/decode.go:548: if u*size > tooBig || u*size < u { ...
9 years, 7 months ago (2014-09-25 21:36:01 UTC) #2
r
https://codereview.appspot.com/142710043/diff/1/src/encoding/gob/decode.go File src/encoding/gob/decode.go (right): https://codereview.appspot.com/142710043/diff/1/src/encoding/gob/decode.go#newcode548 src/encoding/gob/decode.go:548: if u*size > tooBig || u*size < u { ...
9 years, 7 months ago (2014-09-25 21:40:08 UTC) #3
ruiu
https://codereview.appspot.com/142710043/diff/1/src/encoding/gob/decode.go File src/encoding/gob/decode.go (right): https://codereview.appspot.com/142710043/diff/1/src/encoding/gob/decode.go#newcode548 src/encoding/gob/decode.go:548: if u*size > tooBig || u*size < u { ...
9 years, 7 months ago (2014-09-25 21:50:16 UTC) #4
r
Hello golang-codereviews@googlegroups.com, ruiu@google.com (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 7 months ago (2014-09-25 22:07:00 UTC) #5
r
I was trying to avoid the division, but so be it. On Thu, Sep 25, ...
9 years, 7 months ago (2014-09-25 22:07:40 UTC) #6
ruiu
LGTM
9 years, 7 months ago (2014-09-25 22:13:16 UTC) #7
r
*** Submitted as https://code.google.com/p/go/source/detail?r=43ce35dea556 *** encoding/gob: error rather than panic when decoding enormous slices Fixes ...
9 years, 7 months ago (2014-09-25 22:18:28 UTC) #8
dave_cheney.net
Sorry Rob, this change has broken all the 32bit builds --- FAIL: TestErrorForHugeSlice (0.00s) encoder_test.go:954: ...
9 years, 7 months ago (2014-09-25 23:03:18 UTC) #9
r
9 years, 7 months ago (2014-09-25 23:38:52 UTC) #10
on it

On Thu, Sep 25, 2014 at 4:03 PM,  <dave@cheney.net> wrote:
> Sorry Rob, this change has broken all the 32bit builds
>
> --- FAIL: TestErrorForHugeSlice (0.00s)
>         encoder_test.go:954: decode: expected slice too big error, got %s
> gob:
> length of []int is negative (2207646876162 bytes)
> FAIL
> FAIL    encoding/gob    0.064s
>
> https://codereview.appspot.com/142710043/
Sign in to reply to this message.

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