]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: skip TestSegv traceback check on 386
authorMichael Pratt <mpratt@google.com>
Fri, 7 Jan 2022 22:11:41 +0000 (17:11 -0500)
committerMichael Pratt <mpratt@google.com>
Fri, 7 Jan 2022 22:46:47 +0000 (22:46 +0000)
The VDSO (__kernel_vsyscall) is reachable via
asmcgocall(cgo_start_thread) on linux-386, which causes traceback to
throw.

Fixes #49182.
For #50504.

Change-Id: Idb78cb8de752203ce0ed63c2dbd2d12847338688
Reviewed-on: https://go-review.googlesource.com/c/go/+/376656
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>

src/runtime/crash_cgo_test.go

index 058eae1c09c8144f6d2245d3a06ff6fe17b78737..abaed409771a1905583fa5b0262d91c68b9f46a7 100644 (file)
@@ -625,12 +625,20 @@ func TestSegv(t *testing.T) {
                                // TODO(golang.org/issue/49182): Skip, runtime
                                // throws while attempting to generate
                                // traceback.
-                       default:
-                               nowant := "runtime: "
-                               if strings.Contains(got, nowant) {
-                                       t.Errorf("unexpectedly saw %q in output", nowant)
+                               return
+                       case "linux":
+                               if runtime.GOARCH == "386" {
+                                       // TODO(golang.org/issue/50504): Skip,
+                                       // runtime throws while attempting to
+                                       // generate traceback from VDSO call
+                                       // via asmcgocall.
+                                       return
                                }
                        }
+                       nowant := "runtime: "
+                       if strings.Contains(got, nowant) {
+                               t.Errorf("unexpectedly saw %q in output", nowant)
+                       }
                })
        }
 }