commit | 7e63c8b765c30823131bd136d190afbe4c21abc9 | [log] [tgz] |
---|---|---|
author | Jason A. Donenfeld <Jason@zx2c4.com> | Fri May 21 12:01:39 2021 +0200 |
committer | Jason A. Donenfeld <Jason@zx2c4.com> | Fri May 21 13:21:00 2021 +0000 |
tree | b2541afd74abd5d0d7098e89454452940ecd2731 | |
parent | 831573cd21e65c37b4e1bf5d44dc23b125084b7a [diff] |
runtime: wait for Go runtime to initialize in Windows signal test The test harness waits for "ready" as a sign that the Go runtime has installed its signal handler and is ready to be tested. But actually, while LoadLibrary starts the loading of the Go runtime, it does so asynchronously, so the "ready" sign is potentially premature and certainly racy. However, all exported cgo entry points make a call to _cgo_wait_runtime_init_done which waits for that asynchronous initialization to complete. Therefore, this commit fixes the test to call into the exported "Dummy" cgo function before emitting the "ready" sign, so that we're sure the Go runtime is actually loaded. Updates #45638. Change-Id: I9b12b172d45bdcc09d54dd301de3a3e499544834 Reviewed-on: https://go-review.googlesource.com/c/go/+/321769 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.html.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.