diff options
| author | Russ Cox <rsc@golang.org> | 2015-01-14 16:36:41 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-01-14 22:20:33 +0000 |
| commit | f6d0054e718817df636a1281a2f8de04ac663ee8 (patch) | |
| tree | 65bb8c903f22080f82903be72f6ee42ddca5b839 /src/encoding/xml | |
| parent | 882f21d6aef78c55265662dbac3af1d38d6f7c82 (diff) | |
| download | go-f6d0054e718817df636a1281a2f8de04ac663ee8.tar.xz | |
runtime: avoid race checking for preemption
Moving the "don't really preempt" check up earlier in the function
introduced a race where gp.stackguard0 might change between
the early check and the later one. Since the later one is missing the
"don't really preempt" logic, it could decide to preempt incorrectly.
Pull the result of the check into a local variable and use an atomic
to access stackguard0, to eliminate the race.
I believe this will fix the broken OS X and Solaris builders.
Change-Id: I238350dd76560282b0c15a3306549cbcf390dbff
Reviewed-on: https://go-review.googlesource.com/2823
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/encoding/xml')
0 files changed, 0 insertions, 0 deletions
