1
0
mirror of https://github.com/golang/go synced 2024-10-03 15:21:22 -06:00
go/src/cmd/gc
Dmitriy Vyukov 21b2ce724a 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://golang.org/cl/6525052/diff/7020/src/pkg/runtime/race/regression_test.go

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6611049
2012-10-10 18:09:23 +04:00
..
align.c cmd/gc: more graceful handling of invalid fields in widstruct. 2012-10-07 21:46:10 +02:00
bisonerrors gc: support for building with Plan 9 yacc 2011-11-16 16:58:02 -05:00
bits.c gc: format nits 2011-11-07 11:42:08 -05:00
builtin.c race: gc changes 2012-10-02 10:05:46 +04:00
closure.c build: fix various 'set and not used' for Plan 9 2012-09-17 17:25:26 -04:00
const.c cmd/gc: recognize small TPTR64 values as small integer constants. 2012-09-11 19:45:28 +10:00
cplx.c cmd/gc: contiguous loop layout 2012-05-30 18:07:39 -04:00
dcl.c cmd/gc: Don't export embedded builtins 2012-10-07 06:53:57 +02:00
doc.go race: gc changes 2012-10-02 10:05:46 +04:00
esc.c cmd/gc: Missing break in esc switch. 2012-10-01 16:33:06 +02:00
export.c cmd/gc: Specify which package import caused an redeclaration error. 2012-09-13 18:40:50 +02:00
fmt.c cmd/gc: avoid crash in %N print 2012-10-07 15:35:01 -04:00
gen.c cmd/gc: avoid clobbering the AST in cgen_callmeth. 2012-10-07 00:52:40 +02:00
go.errors gc: improve error message for composite literals with unexpected newlines 2012-04-02 11:00:55 -04:00
go.h cmd/gc: more graceful handling of invalid fields in widstruct. 2012-10-07 21:46:10 +02:00
go.y cmd/gc: point "no new variables" error at right line number. 2012-07-29 22:24:19 -04:00
init.c gc: changes in export format in preparation of inlining. 2011-12-05 14:40:19 -05:00
inl.c cmd/gc: fix comment for caninl 2012-09-24 12:30:32 -04:00
lex.c cmd/gc: skip over reported BOMs 2012-10-07 16:35:45 -04:00
Makefile build: update Makefile to track source code dependencies better 2012-03-13 03:31:11 +08:00
md5.c gc: shuffle #includes 2011-08-25 16:25:10 -04:00
md5.h
mkbuiltin gc: fix comment in mkbuiltin 2012-02-14 16:27:35 -05:00
mkbuiltin1.c gc: delete old unsafe functions 2012-02-13 15:37:35 -05:00
mkopnames gc: use octal escapes in mkopnames 2012-01-31 18:15:42 -08:00
mparith1.c build: fix various 'set and not used' for Plan 9 2012-09-17 17:25:26 -04:00
mparith2.c cmd/gc: error on constant shift overflows. 2012-02-16 00:19:42 +01:00
mparith3.c gc: make constant arith errors a little more friendly 2012-02-11 00:50:56 -05:00
obj.c cmd/gc: prepare for 64-bit ints 2012-09-24 14:59:44 -04:00
order.c cmd/gc: forgotten recursion on ninit itself in order.c 2012-01-26 15:10:24 +01:00
pgen.c race: gc changes 2012-10-02 10:05:46 +04:00
racewalk.c cmd/gc: fix compiler crash during race instrumentation 2012-10-10 18:09:23 +04:00
range.c test/fixedbugs/bug454.go: add a test for CL 6564052 2012-09-29 23:23:56 +08:00
reflect.c cmd/gc: Don't export embedded builtins 2012-10-07 06:53:57 +02:00
runtime.go race: gc changes 2012-10-02 10:05:46 +04:00
select.c gc: introduce temp = nod+tempname 2011-09-02 15:35:16 -04:00
sinit.c cmd/gc: avoid clobbering the AST in cgen_callmeth. 2012-10-07 00:52:40 +02:00
subr.c ld: add .gcdata and .gcbss sections 2012-09-13 15:59:34 -04:00
swt.c cmd/gc: add missing conversion from bool to interface in switches. 2012-09-17 21:29:10 +02:00
typecheck.c cmd/gc: replace "typechecking loop" by nicer errors in some cases. 2012-10-07 17:35:21 +02:00
unsafe.c gc: keep pointer to original node in constant rewrites. 2011-12-07 16:18:50 -05:00
unsafe.go gc: delete old unsafe functions 2012-02-13 15:37:35 -05:00
walk.c cmd/gc: prepare for 64-bit ints 2012-09-24 14:59:44 -04:00
y.tab.c cmd/gc: point "no new variables" error at right line number. 2012-07-29 22:24:19 -04:00
y.tab.h cmd/gc: point "no new variables" error at right line number. 2012-07-29 22:24:19 -04:00
yerr.h gc: improve error message for composite literals with unexpected newlines 2012-04-02 11:00:55 -04:00