aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 12e2e71e99..64f6a35209 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -63,11 +63,13 @@ func main() {
if _cgo_free == nil {
gothrow("_cgo_free missing")
}
- if _cgo_setenv == nil {
- gothrow("_cgo_setenv missing")
- }
- if _cgo_unsetenv == nil {
- gothrow("_cgo_unsetenv missing")
+ if GOOS != "windows" {
+ if _cgo_setenv == nil {
+ gothrow("_cgo_setenv missing")
+ }
+ if _cgo_unsetenv == nil {
+ gothrow("_cgo_unsetenv missing")
+ }
}
}
@@ -165,6 +167,7 @@ func acquireSudog() *sudog {
gothrow("acquireSudog: found s.elem != nil in cache")
}
c.sudogcache = s.next
+ s.next = nil
return s
}
@@ -193,6 +196,15 @@ func releaseSudog(s *sudog) {
if s.selectdone != nil {
gothrow("runtime: sudog with non-nil selectdone")
}
+ if s.next != nil {
+ gothrow("runtime: sudog with non-nil next")
+ }
+ if s.prev != nil {
+ gothrow("runtime: sudog with non-nil prev")
+ }
+ if s.waitlink != nil {
+ gothrow("runtime: sudog with non-nil waitlink")
+ }
gp := getg()
if gp.param != nil {
gothrow("runtime: releaseSudog with non-nil gp.param")