mirror of
https://github.com/golang/go
synced 2024-11-24 14:30:17 -07:00
runtime: fix crash on Plan 9
Since CL 46037, the runtime is crashing after calling exitThread on Plan 9. The exitThread function shouldn't be called on Plan 9, because the system manages thread stacks. Fixes #22221. Change-Id: I5d61c9660a87dc27e4cfcb3ca3ddcb4b752f2397 Reviewed-on: https://go-review.googlesource.com/70190 Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
a509cae90d
commit
926373ea79
@ -1170,10 +1170,10 @@ func mstart() {
|
|||||||
mstart1(0)
|
mstart1(0)
|
||||||
|
|
||||||
// Exit this thread.
|
// Exit this thread.
|
||||||
if GOOS == "windows" || GOOS == "solaris" {
|
if GOOS == "windows" || GOOS == "solaris" || GOOS == "plan9" {
|
||||||
// Windows and Solaris always system-allocate the
|
// Window, Solaris and Plan 9 always system-allocate
|
||||||
// stack, but put it in _g_.stack before mstart, so
|
// the stack, but put it in _g_.stack before mstart,
|
||||||
// the logic above hasn't set osStack yet.
|
// so the logic above hasn't set osStack yet.
|
||||||
osStack = true
|
osStack = true
|
||||||
}
|
}
|
||||||
mexit(osStack)
|
mexit(osStack)
|
||||||
|
Loading…
Reference in New Issue
Block a user