aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/panic.go
diff options
context:
space:
mode:
authorqiulaidongfeng <2645477756@qq.com>2024-09-09 09:01:23 +0000
committerGopher Robot <gobot@golang.org>2024-09-10 21:10:43 +0000
commit3da4281df1b0c7ea11b524ff19fc2f409b8e58c0 (patch)
tree10de5bee7a0c41330cc20a66d3b7d83ed3cd9878 /src/runtime/panic.go
parent77e42fdeaf98d241dc09f4eb92e09225aea8f4c3 (diff)
downloadgo-3da4281df1b0c7ea11b524ff19fc2f409b8e58c0.tar.xz
runtime: Goexit on C-created thread report more useful error message
Fixes #68275 Change-Id: I47b7a2092f1b4d48aebf437db4e329815c956bb9 GitHub-Last-Rev: b89bf3cab7f9f7611122f535914f2788564643c5 GitHub-Pull-Request: golang/go#69126 Reviewed-on: https://go-review.googlesource.com/c/go/+/609296 Reviewed-by: Tim King <taking@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/runtime/panic.go')
-rw-r--r--src/runtime/panic.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go
index bd1ea096aa..ed08bf4f30 100644
--- a/src/runtime/panic.go
+++ b/src/runtime/panic.go
@@ -614,6 +614,8 @@ func deferreturn() {
// without func main returning. Since func main has not returned,
// the program continues execution of other goroutines.
// If all other goroutines exit, the program crashes.
+//
+// It crashes if called from a thread not created by the Go runtime.
func Goexit() {
// Create a panic object for Goexit, so we can recognize when it might be
// bypassed by a recover().