aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-09-20 00:33:29 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-09-20 00:33:29 +0000
commit8fca13953b551bb75af0a31d737a297de97676a7 (patch)
treee54ea762823ee955d7cd3ef3ae2b8bd4e97b5cf9
parent9bd25fc4e2119dd08257f7326c7115c4371f98df (diff)
downloadgcc-8fca13953b551bb75af0a31d737a297de97676a7.zip
gcc-8fca13953b551bb75af0a31d737a297de97676a7.tar.gz
gcc-8fca13953b551bb75af0a31d737a297de97676a7.tar.bz2
runtime: restore "goroutine in C code" message
In the 1.9 upgrade I took out the word "goroutine" from a traceback showing a goroutine running in C code, to let TestCgoNumGoroutine pass. However, it turns out that some code is actually checking for that string; for example, https://github.com/grpc/grpc-go/blob/master/test/leakcheck/leakcheck.go#L44 So keep the message the same, and change the test. Reviewed-on: https://go-review.googlesource.com/64850 From-SVN: r252991
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--libgo/go/runtime/testdata/testprogcgo/numgoroutine.go1
-rw-r--r--libgo/go/runtime/traceback_gccgo.go2
3 files changed, 3 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 27bcb6e..f6b5361 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-be69546afcac182cc93c569bc96665f0ef72d66a
+5fb74cd7192123a9ea06dcae0d5d8d0b3538db8f
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/go/runtime/testdata/testprogcgo/numgoroutine.go b/libgo/go/runtime/testdata/testprogcgo/numgoroutine.go
index 12fda49..68f1738 100644
--- a/libgo/go/runtime/testdata/testprogcgo/numgoroutine.go
+++ b/libgo/go/runtime/testdata/testprogcgo/numgoroutine.go
@@ -75,6 +75,7 @@ func checkNumGoroutine(label string, want int) (string, bool) {
sbuf := make([]byte, 32<<10)
sbuf = sbuf[:runtime.Stack(sbuf, true)]
n = strings.Count(string(sbuf), "goroutine ")
+ n -= strings.Count(string(sbuf), "goroutine in C code")
if n != want {
fmt.Printf("%s Stack: want %d; got %d:\n%s\n", label, want, n, string(sbuf))
return "", false
diff --git a/libgo/go/runtime/traceback_gccgo.go b/libgo/go/runtime/traceback_gccgo.go
index f29ccd7..37c5698 100644
--- a/libgo/go/runtime/traceback_gccgo.go
+++ b/libgo/go/runtime/traceback_gccgo.go
@@ -216,7 +216,7 @@ func tracebackothers(me *g) {
print("\tgoroutine running on other thread; stack unavailable\n")
printcreatedby(gp)
} else if readgstatus(gp)&^_Gscan == _Gsyscall {
- print("\tin C code; stack unavailable\n")
+ print("\tgoroutine in C code; stack unavailable\n")
printcreatedby(gp)
} else {
gp.traceback = &tb