]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/syntax: avoid deadlock
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 1 Nov 2016 19:27:26 +0000 (12:27 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 1 Nov 2016 20:19:01 +0000 (20:19 +0000)
commit3f1ed245510d21ad021ea96da7bbd37ec2aca9ed
tree1bec088177f6fa33dc83928ca8274256890f31cf
parent84803f3da1b3921a6eacec435d97d5b9e40fe947
cmd/compile/internal/syntax: avoid deadlock

When the err from ReadFile is non-nil, we call t.Fatal(err).
Switch t.Fatal to t.Error + return.
ensure that close(results) happens on that code path as well.

Updates #17697.

Change-Id: Ifaacf27a76c175446d642086ff32f4386428080d
Reviewed-on: https://go-review.googlesource.com/32486
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/syntax/parser_test.go