runtime: prevent deadlock when profiling signal arrives in stack scan
authorIan Lance Taylor <ian@gcc.gnu.org>
Sat, 29 Dec 2018 00:07:06 +0000 (00:07 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Sat, 29 Dec 2018 00:07:06 +0000 (00:07 +0000)
commite20bfbd18e64b8ab9428aa518b5d7b74a73461d9
treea5200fb4bd7b40981b58590f089defa85c251512
parent50bec22834e0b147fca92bea80501bccc309ce4d
runtime: prevent deadlock when profiling signal arrives in stack scan

    Precise stack scan needs to unwind the stack. When it is
    unwinding the stack, if a profiling signal arrives, which also
    does a traceback, it may deadlock in dl_iterate_phdr. Prevent
    this deadlock by setting up runtime_in_callers before traceback.

    Reviewed-on: https://go-review.googlesource.com/c/155766

From-SVN: r267457
gcc/go/gofrontend/MERGE
libgo/runtime/go-callers.c
libgo/runtime/go-unwind.c
libgo/runtime/runtime.h