r267590 - in /trunk: gcc/go/gofrontend/MERGE li...

ian@gcc.gnu.org ian@gcc.gnu.org
Sat Jan 5 00:40:00 GMT 2019


Author: ian
Date: Sat Jan  5 00:40:04 2019
New Revision: 267590

URL: https://gcc.gnu.org/viewcvs?rev=267590&root=gcc&view=rev
Log:
    runtime: prevent deadlock when profiling signal arrives during traceback
    
    Traceback routines, e.g. callers and funcentry, may call
    __go_get_backtrace_state. If a profiling signal arrives while we
    are in the critical section of __go_get_backtrace_state, it tries
    to do a traceback, which also calls __go_get_backtrace_state,
    which tries to enter the same critical section and will deadlock.
    Prevent this deadlock by setting up runtime_in_callers before
    calling __go_get_backtrace_state.
    
    Found while investigating golang/go#29448. Will add a test in the
    next CL.
    
    Updates golang/go#29448.
    
    Reviewed-on: https://go-review.googlesource.com/c/156037

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/libgo/runtime/go-caller.c
    trunk/libgo/runtime/go-callers.c



More information about the Gcc-cvs mailing list