diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-02-08 15:30:22 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-02-08 15:30:22 +0000 |
commit | 9adab5dd169afd191efd1dcbf50dae0f726a0a42 (patch) | |
tree | 55e1207fb22e51fd55c08d7f337c1822acf46f7b /libgo/go/runtime/crash_cgo_test.go | |
parent | b5ec4de777870e2d4ff2a5de604eafd1bf0e50df (diff) | |
download | gcc-9adab5dd169afd191efd1dcbf50dae0f726a0a42.zip gcc-9adab5dd169afd191efd1dcbf50dae0f726a0a42.tar.gz gcc-9adab5dd169afd191efd1dcbf50dae0f726a0a42.tar.bz2 |
libgo: update to Go1.10rc2
Reviewed-on: https://go-review.googlesource.com/92736
From-SVN: r257493
Diffstat (limited to 'libgo/go/runtime/crash_cgo_test.go')
-rw-r--r-- | libgo/go/runtime/crash_cgo_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libgo/go/runtime/crash_cgo_test.go b/libgo/go/runtime/crash_cgo_test.go index 3532147..6688b3c 100644 --- a/libgo/go/runtime/crash_cgo_test.go +++ b/libgo/go/runtime/crash_cgo_test.go @@ -493,3 +493,24 @@ func TestSigStackSwapping(t *testing.T) { t.Errorf("expected %q got %v", want, got) } } + +func TestCgoTracebackSigpanic(t *testing.T) { + // Test unwinding over a sigpanic in C code without a C + // symbolizer. See issue #23576. + if runtime.GOOS == "windows" { + // On Windows if we get an exception in C code, we let + // the Windows exception handler unwind it, rather + // than injecting a sigpanic. + t.Skip("no sigpanic in C on windows") + } + t.Parallel() + got := runTestProg(t, "testprogcgo", "TracebackSigpanic") + want := "runtime.sigpanic" + if !strings.Contains(got, want) { + t.Fatalf("want failure containing %q. output:\n%s\n", want, got) + } + nowant := "unexpected return pc" + if strings.Contains(got, nowant) { + t.Fatalf("failure incorrectly contains %q. output:\n%s\n", nowant, got) + } +} |