]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] cmd/compile/internal/ssa: don't schedule values after select
authorIlya Tocar <ilya.tocar@intel.com>
Tue, 21 Feb 2017 22:57:37 +0000 (16:57 -0600)
committerAustin Clements <austin@google.com>
Mon, 27 Mar 2017 14:51:45 +0000 (14:51 +0000)
commitc955eb19354a45250d0a3b545a551848a4d48729
treedd122299bc9eeed93007f24ff7106080c6b0572c
parentf8ed4539eb02e168aeeba891c38973336aa8e21c
[release-branch.go1.8] cmd/compile/internal/ssa: don't schedule values after select

Scheduling values after calls to selectrecv,
will cause them to be executed multiple times, due to runtime.selectgo
jumping to the next instruction in the selectrecv basic block.
Prevent this by scheduling calls to selectrecv as late as possible

Fixes #19201

Change-Id: I6415792e2c465dc6d9bd6583ba1e54b107bcf5cc
Reviewed-on: https://go-review.googlesource.com/38587
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/schedule.go
test/fixedbugs/issue19201.go [new file with mode: 0644]