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

Issue 26970044: code review 26970044: reflect: prevent the callXX routines from calling makeF... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by khr
Modified:
10 years, 4 months ago
Reviewers:
rsc
CC:
golang-dev, dvyukov, rsc, iant, khr1
Visibility:
Public.

Description

reflect: prevent the callXX routines from calling makeFuncStub and methodValueCall directly. Instead, we inline their behavior inside of reflect.call. This change is required because otherwise we have a situation where reflect.callXX calls makeFuncStub, neither of which knows the layout of the args passed between them. That's bad for precise gc & stack copying. Fixes issue 6619.

Patch Set 1 #

Patch Set 2 : diff -r b1edf8faa5d6 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 3 : diff -r b1edf8faa5d6 https://khr%40golang.org@code.google.com/p/go/ #

Total comments: 3

Patch Set 4 : diff -r b1edf8faa5d6 https://khr%40golang.org@code.google.com/p/go/ #

Total comments: 2

Patch Set 5 : diff -r b1edf8faa5d6 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 6 : diff -r c0c3b15cd115 https://khr%40golang.org@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -0 lines) Patch
M src/pkg/reflect/all_test.go View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
M src/pkg/reflect/value.go View 1 2 3 4 3 chunks +32 lines, -0 lines 0 comments Download

Messages

Total messages: 11
khr
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://khr%40golang.org@code.google.com/p/go/
10 years, 5 months ago (2013-11-19 06:00:47 UTC) #1
dvyukov
On Tue, Nov 19, 2013 at 10:00 AM, <khr@golang.org> wrote: > Reviewers: golang-dev1, > > ...
10 years, 5 months ago (2013-11-19 06:08:40 UTC) #2
rsc
there are a variety of syntaxes. i don't know whether fixes bug nnn will work, ...
10 years, 5 months ago (2013-11-19 14:31:10 UTC) #3
iant
Test? https://codereview.appspot.com/26970044/diff/40001/src/pkg/reflect/value.go File src/pkg/reflect/value.go (right): https://codereview.appspot.com/26970044/diff/40001/src/pkg/reflect/value.go#newcode392 src/pkg/reflect/value.go:392: if x.code == makeFuncStubCode { If we do ...
10 years, 5 months ago (2013-11-19 14:31:28 UTC) #4
khr1
On Tue, Nov 19, 2013 at 6:31 AM, <iant@golang.org> wrote: > Test? > > Test ...
10 years, 5 months ago (2013-11-19 18:59:53 UTC) #5
iant
On 2013/11/19 18:59:53, khr1 wrote: > > src/pkg/reflect/value.go:392: if x.code == makeFuncStubCode { > > ...
10 years, 5 months ago (2013-11-19 19:17:54 UTC) #6
khr1
On Tue, Nov 19, 2013 at 11:17 AM, <iant@golang.org> wrote: > On 2013/11/19 18:59:53, khr1 ...
10 years, 5 months ago (2013-11-19 21:27:07 UTC) #7
iant
On 2013/11/19 21:27:07, khr1 wrote: > On Tue, Nov 19, 2013 at 11:17 AM, <mailto:iant@golang.org> ...
10 years, 5 months ago (2013-11-19 22:38:08 UTC) #8
rsc
LGTM https://codereview.appspot.com/26970044/diff/60001/src/pkg/reflect/value.go File src/pkg/reflect/value.go (right): https://codereview.appspot.com/26970044/diff/60001/src/pkg/reflect/value.go#newcode393 src/pkg/reflect/value.go:393: println("short circuit makeFuncStub") delete https://codereview.appspot.com/26970044/diff/60001/src/pkg/reflect/value.go#newcode497 src/pkg/reflect/value.go:497: println("short circuit ...
10 years, 5 months ago (2013-11-21 14:56:06 UTC) #9
khr1
Sorry, missed an "hg upload". Fixed. On Thu, Nov 21, 2013 at 6:56 AM, <rsc@golang.org> ...
10 years, 5 months ago (2013-11-21 17:13:39 UTC) #10
khr
10 years, 4 months ago (2013-12-02 21:36:53 UTC) #11
*** Submitted as https://code.google.com/p/go/source/detail?r=b1cee87f82aa ***

reflect: prevent the callXX routines from calling makeFuncStub
and methodValueCall directly.  Instead, we inline their behavior
inside of reflect.call.

This change is required because otherwise we have a situation where
reflect.callXX calls makeFuncStub, neither of which knows the
layout of the args passed between them.  That's bad for
precise gc & stack copying.

Fixes issue 6619.

R=golang-dev, dvyukov, rsc, iant, khr
CC=golang-dev
https://codereview.appspot.com/26970044
Sign in to reply to this message.

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