]> Cypherpunks repositories - gostls13.git/commit
runtime: fix crash in select
authorIan Lance Taylor <iant@golang.org>
Wed, 8 May 2013 21:58:34 +0000 (14:58 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 8 May 2013 21:58:34 +0000 (14:58 -0700)
commit26d95d802750371cdfa50e7fe0a305c20dac1826
tree5ccfa2e7c1816a3db744317c7906aed4183eb9ac
parent2d846f65215cd35eb03b79871f79f03383df67cb
runtime: fix crash in select
runtime.park() can access freed select descriptor
due to a racing free in another thread.
See the comment for details.

Slightly modified version of dvyukov's CL 9259045.

No test yet.  Before this CL, the test described in issue 5422
would fail about every 40 times for me.  With this CL, I ran
the test 5900 times with no failures.

Fixes #5422.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9311043
src/pkg/runtime/chan.c