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

Issue 6553050: code review 6553050: cgo: protect against zero divide when computing padding... (Closed)

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

Description

cgo: set alignment to 1 for unions and classes; avoids crash from divide-by-zero Fixes issue 4114.

Patch Set 1 #

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

Total comments: 1

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

Total comments: 1

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M src/cmd/cgo/gcc.go View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 12
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 6 months ago (2012-09-21 10:44:55 UTC) #1
iant
https://codereview.appspot.com/6553050/diff/3001/src/cmd/cgo/out.go File src/cmd/cgo/out.go (right): https://codereview.appspot.com/6553050/diff/3001/src/cmd/cgo/out.go#newcode218 src/cmd/cgo/out.go:218: if t.Align != 0 && off%t.Align != 0 { ...
11 years, 6 months ago (2012-09-21 14:06:48 UTC) #2
rsc
Align=1 sgtm
11 years, 6 months ago (2012-09-21 14:30:08 UTC) #3
r
Is there any other way for a zero alignment to arise in a C program? ...
11 years, 6 months ago (2012-09-21 19:30:02 UTC) #4
r
Hello golang-dev@googlegroups.com, iant@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 6 months ago (2012-09-21 19:30:06 UTC) #5
iant2
On Fri, Sep 21, 2012 at 12:30 PM, Rob Pike <r@golang.org> wrote: > Is there ...
11 years, 6 months ago (2012-09-21 19:38:56 UTC) #6
iant
https://codereview.appspot.com/6553050/diff/8001/src/cmd/cgo/gcc.go File src/cmd/cgo/gcc.go (right): https://codereview.appspot.com/6553050/diff/8001/src/cmd/cgo/gcc.go#newcode1203 src/cmd/cgo/gcc.go:1203: t.Align = 1 // No useful alignment information for ...
11 years, 6 months ago (2012-09-21 19:41:17 UTC) #7
dho
2012/9/21 <iant@golang.org>: > > https://codereview.appspot.com/6553050/diff/8001/src/cmd/cgo/gcc.go > File src/cmd/cgo/gcc.go (right): > > https://codereview.appspot.com/6553050/diff/8001/src/cmd/cgo/gcc.go#newcode1203 > src/cmd/cgo/gcc.go:1203: t.Align ...
11 years, 6 months ago (2012-09-21 19:43:01 UTC) #8
r
Hello golang-dev@googlegroups.com, iant@golang.org, rsc@golang.org, iant@google.com, devon.odell@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 6 months ago (2012-09-21 19:47:15 UTC) #9
iant
LGTM
11 years, 6 months ago (2012-09-21 19:48:51 UTC) #10
dho
LGTM
11 years, 6 months ago (2012-09-21 19:49:27 UTC) #11
r
11 years, 6 months ago (2012-09-21 21:26:01 UTC) #12
*** Submitted as http://code.google.com/p/go/source/detail?r=24d74bd32d81 ***

cgo: set alignment to 1 for unions and classes; avoids crash from divide-by-zero
Fixes issue 4114.

R=golang-dev, iant, rsc, iant, devon.odell
CC=golang-dev
http://codereview.appspot.com/6553050
Sign in to reply to this message.

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