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

Issue 6011057: code review 6011057: fmt: fix crash of %b on huge negative int64 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by r
Modified:
12 years ago
Reviewers:
r2
CC:
golang-dev, dave_cheney.net, dsymonds
Visibility:
Public.

Description

fmt: fix crash of %b on huge negative int64 The buffer had 64 bytes but needs one more for the sign. Fixes issue 3510.

Patch Set 1 #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M src/pkg/fmt/fmt_test.go View 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/fmt/format.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
12 years ago (2012-04-12 22:52:21 UTC) #1
dave_cheney.net
LGTM. > + // Used to crash because nByte didn't allow for a sign. > ...
12 years ago (2012-04-12 22:59:09 UTC) #2
dsymonds
LGTM
12 years ago (2012-04-12 22:59:34 UTC) #3
r
*** Submitted as http://code.google.com/p/go/source/detail?r=344d5c33331a *** fmt: fix crash of %b on huge negative int64 The ...
12 years ago (2012-04-12 23:28:58 UTC) #4
r2
On 13/04/2012, at 8:59 AM, Dave Cheney wrote: > LGTM. > >> + // Used ...
12 years ago (2012-04-12 23:30:05 UTC) #5
dave_cheney.net
12 years ago (2012-04-12 23:35:52 UTC) #6
Sure thing, there is always the linkage via the commit message to the CL and
issue. 

On 13/04/2012, at 9:29, Rob 'Commander' Pike <r@google.com> wrote:

> 
> On 13/04/2012, at 8:59 AM, Dave Cheney wrote:
> 
>> LGTM. 
>> 
>>> +    // Used to crash because nByte didn't allow for a sign.
>>> +    {"%b", int64(-1 << 63),
"-1000000000000000000000000000000000000000000000000000000000000000"},
>> 
>> Maybe reference issue 3510 here?
> 
> I prefer not to add out-of-band details like that to code unless it adds
context. Here the bug is so simple and well-defined and easy to reproduce that
such a link would encourage people to look elsewhere yet learn nothing for their
trouble.
> 
> -rob
> 
> 
Sign in to reply to this message.

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