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

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 1 month ago by lvd
Modified:
5 years 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 rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
5 years, 1 month ago (2012-04-18 13:56:18 UTC) #1
rsc
LGTM I added a bunch more tests to escape2.go. Will submit.
5 years 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 ...
5 years ago (2012-04-23 19:42:29 UTC) #3
lvd
5 years ago (2012-04-23 20:03:43 UTC) #4
thanks

On Mon, Apr 23, 2012 at 21:42, <rsc@golang.org> 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 <rsc@golang.org>
>
>
>
>
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 80a51fa-tainted