]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.5] runtime: handle sigprof in stackBarrier
authorAustin Clements <austin@google.com>
Wed, 18 Nov 2015 18:20:35 +0000 (13:20 -0500)
committerAustin Clements <austin@google.com>
Fri, 20 Nov 2015 19:53:41 +0000 (19:53 +0000)
commit2a6c7739b5bdb5fbaf743d89a18bd466fb178fe1
tree40625f58609c49307f246838fd9e845c6f9fe7cf
parenta10b27094cbddd7d470281590a50b5b38265e541
[release-branch.go1.5] runtime: handle sigprof in stackBarrier

Currently, if a profiling signal happens in the middle of
stackBarrier, gentraceback may see inconsistencies between stkbar and
the barriers on the stack and it will certainly get the wrong return
PC for stackBarrier. In most cases, the return PC won't be a PC at all
and this will immediately abort the traceback (which is considered
okay for a sigprof), but if it happens to be a valid PC this may sent
gentraceback down a rabbit hole.

Fix this by detecting when the gentraceback starts in stackBarrier and
simulating the completion of the barrier to get the correct initial
frame.

Change-Id: Ib11f705ac9194925f63fe5dfbfc84013a38333e6
Reviewed-on: https://go-review.googlesource.com/17035
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/17056
src/runtime/traceback.go