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

Issue 12785045: code review 12785045: cmd/gc, runtime: use type information to scan interface... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by cshapiro1
Modified:
11 years, 9 months ago
Reviewers:
rsc, dvyukov
CC:
golang-dev, rsc
Visibility:
Public.

Description

cmd/gc, runtime: use type information to scan interface values

Patch Set 1 #

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

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

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

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

Total comments: 6

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

Patch Set 7 : diff -r 8bf13ae02c8e https://code.google.com/p/go/ #

Patch Set 8 : diff -r 8bf13ae02c8e https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -12 lines) Patch
M src/cmd/gc/pgen.c View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 5 chunks +43 lines, -11 lines 0 comments Download

Messages

Total messages: 13
cshapiro1
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 9 months ago (2013-08-17 01:17:11 UTC) #1
rsc
LGTM assuming we do better later
11 years, 9 months ago (2013-08-17 01:25:21 UTC) #2
dvyukov
https://codereview.appspot.com/12785045/diff/10001/src/pkg/runtime/mgc0.c File src/pkg/runtime/mgc0.c (right): https://codereview.appspot.com/12785045/diff/10001/src/pkg/runtime/mgc0.c#newcode1449 src/pkg/runtime/mgc0.c:1449: scaninterfacedata(bits, scanp, inprologue); why only scanning of interfaces depends ...
11 years, 9 months ago (2013-08-17 09:44:23 UTC) #3
dvyukov
LGTM
11 years, 9 months ago (2013-08-17 09:51:10 UTC) #4
cshapiro1
https://codereview.appspot.com/12785045/diff/10001/src/pkg/runtime/mgc0.c File src/pkg/runtime/mgc0.c (right): https://codereview.appspot.com/12785045/diff/10001/src/pkg/runtime/mgc0.c#newcode1449 src/pkg/runtime/mgc0.c:1449: scaninterfacedata(bits, scanp, inprologue); Because only the interface scanning loads ...
11 years, 9 months ago (2013-08-19 17:07:25 UTC) #5
cshapiro1
*** Submitted as https://code.google.com/p/go/source/detail?r=71ce80dc4195 *** cmd/gc, runtime: use type information to scan interface values R=golang-dev, ...
11 years, 9 months ago (2013-08-19 17:20:04 UTC) #6
dvyukov
https://codereview.appspot.com/12785045/diff/10001/src/pkg/runtime/mgc0.c File src/pkg/runtime/mgc0.c (right): https://codereview.appspot.com/12785045/diff/10001/src/pkg/runtime/mgc0.c#newcode1493 src/pkg/runtime/mgc0.c:1493: scanbitvector(frame->argp, args, !afterprologue); On 2013/08/19 17:07:25, cshapiro1 wrote: > ...
11 years, 9 months ago (2013-08-19 17:22:43 UTC) #7
cshapiro1
On 2013/08/19 17:22:43, dvyukov wrote: > In this function you use afterprologue, and in scanbitvector() ...
11 years, 9 months ago (2013-08-19 17:26:28 UTC) #8
dvyukov
https://codereview.appspot.com/12785045/diff/10001/src/pkg/runtime/mgc0.c File src/pkg/runtime/mgc0.c (right): https://codereview.appspot.com/12785045/diff/10001/src/pkg/runtime/mgc0.c#newcode1449 src/pkg/runtime/mgc0.c:1449: scaninterfacedata(bits, scanp, inprologue); On 2013/08/19 17:07:25, cshapiro1 wrote: > ...
11 years, 9 months ago (2013-08-19 17:28:01 UTC) #9
cshapiro1
On 2013/08/19 17:28:01, dvyukov wrote: > I thought that it's 100% precise now, and so ...
11 years, 9 months ago (2013-08-19 17:33:11 UTC) #10
dvyukov
On 2013/08/19 17:33:11, cshapiro1 wrote: > On 2013/08/19 17:28:01, dvyukov wrote: > > I thought ...
11 years, 9 months ago (2013-08-19 17:38:12 UTC) #11
dvyukov
Race builder is unhappy: http://build.golang.org/log/952a3ae2cc1e7594abc8c71d1fbc999acdea2176 There is that weird: goroutine 8 [runnable]: runtime/race._Cfunc___tsan_func_enter(0x1b373d8, 0x531156) runtime/race/_obj/_cgo_defun.c:79 ...
11 years, 9 months ago (2013-08-19 17:41:40 UTC) #12
cshapiro1
11 years, 9 months ago (2013-08-19 17:46:38 UTC) #13
Message was sent while issue was closed.
On 2013/08/19 17:41:40, dvyukov wrote:
> I suspect that GC and traceback printing use different pc/sp for traceback. GC
> looks at g->syscallsp, and traceback looks as g->status==Gsyscall. So it may
be
> not the stack GC observed.

Two stack contain something similar to the following

SIGSEGV: segmentation violation
PC=0x410d70

scaninterfacedata(0x2, 0x7fca5bbbd888, 0x7fca599ccb00)
	/usr/local/go/src/pkg/runtime/mgc0.c:1416 +0x30
scanbitvector(0x7fca5bbbd888, 0x8bd108, 0xaf4100)
	/usr/local/go/src/pkg/runtime/mgc0.c:1449 +0x10a
addframeroots(0x7fca599ccbc8, 0x0)
	/usr/local/go/src/pkg/runtime/mgc0.c:1493 +0x137
runtime.gentraceback(0x40cc80, 0x7fca5bbbd768, 0x0, 0xc210047c60, 0x0, ...)

For the record, this means that something tried to load the type of an interface
pointer and loaded an invalid pointer instead.
Sign in to reply to this message.

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