diff mbox series

libgo patch committed: Restore "goroutine in C code" message

Message ID CAOyqgcWhmqxQEn45W1tEYwLmRhqk4cVpeVMzzs1i0zuCs6SMxw@mail.gmail.com
State New
Headers show
Series libgo patch committed: Restore "goroutine in C code" message | expand

Commit Message

Ian Lance Taylor Sept. 20, 2017, 12:33 a.m. UTC
In the 1.9 upgrade of libgo 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.  Bootstrapped and
ran Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian
diff mbox series

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 252953)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -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.
Index: libgo/go/runtime/testdata/testprogcgo/numgoroutine.go
===================================================================
--- libgo/go/runtime/testdata/testprogcgo/numgoroutine.go	(revision 252767)
+++ libgo/go/runtime/testdata/testprogcgo/numgoroutine.go	(working copy)
@@ -75,6 +75,7 @@  func checkNumGoroutine(label string, wan
 	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
Index: libgo/go/runtime/traceback_gccgo.go
===================================================================
--- libgo/go/runtime/traceback_gccgo.go	(revision 252767)
+++ libgo/go/runtime/traceback_gccgo.go	(working copy)
@@ -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