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

Issue 6611049: code review 6611049: cmd/gc: fix compiler crash during race instrumentation (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 2 months ago by dvyukov
Modified:
10 years, 1 month ago
Reviewers:
CC:
golang-dev, minux1, rsc
Visibility:
Public.

Description

cmd/gc: fix compiler crash during race instrumentation The compiler is crashing on the following code: type TypeID int func (t *TypeID) encodeType(x int) (tt TypeID, err error) { switch x { case 0: return t.encodeType(x * x) } return 0, nil } The pass marks "return struct" {tt TypeID, err error} as used, and this causes internal check failure. I've added the test to: https://codereview.appspot.com/6525052/diff/7020/src/pkg/runtime/race/regression_test.go

Patch Set 1 #

Patch Set 2 : diff -r dfb1b5655e21 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r 3350c94fe6b7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r ba847b110365 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r ba847b110365 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r 72b15c5d6f65 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -13 lines) Patch
M src/cmd/gc/racewalk.c View 1 2 5 chunks +21 lines, -13 lines 0 comments Download

Messages

Total messages: 5
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 1 month ago (2012-10-09 16:57:14 UTC) #1
minux1
should we add a test to /test/fixedbugs/ for this? i guess we need to modify ...
10 years, 1 month ago (2012-10-09 17:06:55 UTC) #2
dvyukov
dunno I am fine with having tests in https://codereview.appspot.** com/6525052/diff/7020/src/pkg/**runtime/race/regression_test.**go<https://codereview.appspot.com/6525052/diff/7020/src/pkg/runtime/race/regression_test.go> On Tue, Oct 9, 2012 ...
10 years, 1 month ago (2012-10-09 17:12:13 UTC) #3
rsc
LGTM
10 years, 1 month ago (2012-10-10 13:46:33 UTC) #4
dvyukov
10 years, 1 month ago (2012-10-10 14:09:34 UTC) #5
*** Submitted as http://code.google.com/p/go/source/detail?r=8209534dab87 ***

cmd/gc: fix compiler crash during race instrumentation
The compiler is crashing on the following code:

type TypeID int
func (t *TypeID) encodeType(x int) (tt TypeID, err error) {
        switch x {
        case 0:
                return t.encodeType(x * x)
        }
        return 0, nil
}
The pass marks "return struct" {tt TypeID, err error} as used,
and this causes internal check failure.
I've added the test to:
https://codereview.appspot.com/6525052/diff/7020/src/pkg/runtime/race/regress...

R=golang-dev, minux.ma, rsc
CC=golang-dev
http://codereview.appspot.com/6611049
Sign in to reply to this message.

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