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

Issue 6061043: code review 6061043: cmd/gc: fix addresses escaping through closures called ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by lvd
Modified:
12 years, 6 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

cmd/gc: fix addresses escaping through closures called in-place. Fixes issue 3545.

Patch Set 1 #

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

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

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -30 lines) Patch
M src/cmd/gc/esc.c View 1 9 chunks +40 lines, -30 lines 0 comments Download
M test/escape2.go View 1 1 chunk +31 lines, -0 lines 3 comments Download

Messages

Total messages: 4
lvd
Hello [email protected] (cc: [email protected]), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 7 months ago (2012-04-18 13:56:18 UTC) #1
rsc
LGTM I added a bunch more tests to escape2.go. Will submit.
12 years, 7 months ago (2012-04-23 19:15:21 UTC) #2
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=a890477d3dfb *** cmd/gc: fix addresses escaping through closures called in-place. Fixes issue ...
12 years, 7 months ago (2012-04-23 19:42:29 UTC) #3
lvd
12 years, 7 months ago (2012-04-23 20:03:43 UTC) #4
thanks

On Mon, Apr 23, 2012 at 21:42, <[email protected]> wrote:

> *** Submitted as
>
http://code.google.com/p/go/**source/detail?r=a890477d3dfb<http://code.google...
>
>
> cmd/gc: fix addresses escaping through closures called in-place.
>
> Fixes issue 3545.
>
> R=rsc
> CC=golang-dev
> http://codereview.appspot.com/**6061043<http://codereview.appspot.com/6061043>
>
> Committer: Russ Cox <[email protected]>
>
>
>
>
http://codereview.appspot.com/**6061043/diff/4001/test/**escape2.go<http://co...
> File test/escape2.go (right):
>
> http://codereview.appspot.com/**6061043/diff/4001/test/**
>
escape2.go#newcode1069<http://codereview.appspot.com/6061043/diff/4001/test/escape2.go#newcode1069>
> test/escape2.go:1069: func foo124(x **int) {    // ERROR "does not escape"
> Please put the variable names in these patterns, like above.  In theory
> there is just one thing on each line, but it's safer to be explicit.
>
> Also, please make a foo124a with x = p where x is the global var x *int
> instead of a function parameter.
>
> http://codereview.appspot.com/**6061043/diff/4001/test/**
>
escape2.go#newcode1077<http://codereview.appspot.com/6061043/diff/4001/test/escape2.go#newcode1077>
> test/escape2.go:1077: func foo125(ch chan *int) {       // ERROR "does not
> escape"
> Please make a foo125a variant with defer func instead of just func.
>
> http://codereview.appspot.com/**6061043/diff/4001/test/**
>
escape2.go#newcode1090<http://codereview.appspot.com/6061043/diff/4001/test/escape2.go#newcode1090>
> test/escape2.go:1090: // px = &i  // would escape i-> should move to
> heap, as should the one below
> Confusing.  Delete.
>
>
http://codereview.appspot.com/**6061043/<http://codereview.appspot.com/6061043/>
>
Sign in to reply to this message.

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