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

Issue 6551059: code review 6551059: cmd/gc: fix escape analysis bug (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by rsc
Modified:
11 years, 7 months ago
Reviewers:
ken3, remyoudompheng
CC:
ken2, golang-dev
Visibility:
Public.

Description

cmd/gc: fix escape analysis bug Was not handling &x.y[0] and &x.y.z correctly where y is an array or struct-valued field (not a pointer).

Patch Set 1 #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -1 line) Patch
M src/cmd/gc/esc.c View 1 1 chunk +7 lines, -1 line 0 comments Download
M test/escape2.go View 1 1 chunk +18 lines, -0 lines 0 comments Download
M test/escape4.go View 1 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rsc
Hello ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 7 months ago (2012-09-24 19:53:11 UTC) #1
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=0ece4ff29314 *** cmd/gc: fix escape analysis bug Was not handling &x.y[0] and ...
11 years, 7 months ago (2012-09-24 19:53:16 UTC) #2
ken3
lgtm
11 years, 7 months ago (2012-09-24 20:01:27 UTC) #3
remyoudompheng
I suppose the bug is present in Go 1.0.3 ?
11 years, 7 months ago (2012-09-24 20:10:23 UTC) #4
rsc
11 years, 7 months ago (2012-09-24 21:30:53 UTC) #5
On Mon, Sep 24, 2012 at 4:10 PM, Rémy Oudompheng
<remyoudompheng@gmail.com> wrote:
> I suppose the bug is present in Go 1.0.3 ?

Yes but as far as I know no one has run into it. It is somewhat
compensated for by the fact that &T{} is always treated as escaping
and by the fact that most programs do not allocate a big struct and
then return only a pointer to a piece of it. If we do a Go 1.0.4 we'd
want to include it, but I hope we won't do that.

Russ
Sign in to reply to this message.

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