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

Issue 88100048: code review 88100048: reflect: correct type descriptor for call of interface ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by rsc
Modified:
11 years, 1 month ago
Reviewers:
iant, bradfitz
CC:
golang-codereviews, bradfitz, iant, khr
Visibility:
Public.

Description

reflect: correct type descriptor for call of interface method When preparing a call with an interface method, the argument frame holds the receiver "iword", but funcLayout was being asked to write a descriptor as if the receiver were a complete interface value. This was originally caught by running a large program with Debug=3 in runtime/mgc0.c, but the new panic in funcLayout suffices to catch the mistake with the existing tests. Fixes issue 7748.

Patch Set 1 #

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

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

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

Total comments: 1

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

Patch Set 6 : diff -r 771a1c388e7a https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -8 lines) Patch
M src/pkg/reflect/type.go View 1 1 chunk +4 lines, -1 line 0 comments Download
M src/pkg/reflect/value.go View 1 2 3 4 5 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 5
rsc
Hello golang-codereviews@googlegroups.com (cc: iant, khr), I'd like you to review this change to https://code.google.com/p/go/
11 years, 1 month ago (2014-04-16 02:39:02 UTC) #1
bradfitz
LGTM https://codereview.appspot.com/88100048/diff/60001/src/pkg/reflect/value.go File src/pkg/reflect/value.go (right): https://codereview.appspot.com/88100048/diff/60001/src/pkg/reflect/value.go#newcode672 src/pkg/reflect/value.go:672: func methodReceiver(op string, v Value, methodIndex int) (rcvr, ...
11 years, 1 month ago (2014-04-16 02:43:36 UTC) #2
rsc
Thanks. I renamed the result rcvrtype.
11 years, 1 month ago (2014-04-16 02:56:00 UTC) #3
iant
LGTM
11 years, 1 month ago (2014-04-16 05:01:40 UTC) #4
rsc
11 years, 1 month ago (2014-04-16 15:52:32 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=a0ba4e1b909d ***

reflect: correct type descriptor for call of interface method

When preparing a call with an interface method, the argument
frame holds the receiver "iword", but funcLayout was being
asked to write a descriptor as if the receiver were a complete
interface value. This was originally caught by running a large
program with Debug=3 in runtime/mgc0.c, but the new panic
in funcLayout suffices to catch the mistake with the existing
tests.

Fixes issue 7748.

LGTM=bradfitz, iant
R=golang-codereviews, bradfitz, iant
CC=golang-codereviews, khr
https://codereview.appspot.com/88100048
Sign in to reply to this message.

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