]> Cypherpunks repositories - gostls13.git/commit
runtime: handle async fatal signals in VDSO
authorMichael Pratt <mpratt@google.com>
Wed, 4 Aug 2021 21:33:50 +0000 (17:33 -0400)
committerMichael Pratt <mpratt@google.com>
Tue, 26 Oct 2021 21:32:57 +0000 (21:32 +0000)
commit86f6bf18b013d570e89f57c2decaddca5ce2a847
tree60c69df18411191c525e91278bea1624a32ee654
parent091db6392da5913e4bd4806215102e461dc5649c
runtime: handle async fatal signals in VDSO

If we receive an async signal while running in the VDSO, such as a
SIGABRT or SIGSEGV sent from another process, we fail to print the
stacktrace with "runtime: unknown pc <vdso PC>".

We already have machinery to handle SIGPROF in the VDSO, but it isn't
hooked up for other signals. Add it to the general signal traceback
path.

This case is covered by TestSegv by making the test more strict w.r.t.
accepted output.

Fixes #47537

Change-Id: I755585f70e0c23e207e135bc6bd2aa68298e5d24
Reviewed-on: https://go-review.googlesource.com/c/go/+/339990
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/crash_cgo_test.go
src/runtime/traceback.go