aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-07-21 18:27:35 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-07-21 18:27:35 +0000
commitdf206c6e77551b7eebfa1b7995b2556ac369f4fd (patch)
treeac8824d9cde261316f55212382c6ca9eb2255bd7 /gcc
parent2401ffc3fe5f79e7a1087d8f98f5e3b8bbb1e379 (diff)
downloadgcc-df206c6e77551b7eebfa1b7995b2556ac369f4fd.zip
gcc-df206c6e77551b7eebfa1b7995b2556ac369f4fd.tar.gz
gcc-df206c6e77551b7eebfa1b7995b2556ac369f4fd.tar.bz2
runtime: don't use runtime_lock in __go_get_backtrace_state
If getSiginfo does not know how to determine the PC, it will call runtime_callers. That can happen in a thread that was started by non-Go code, in which case the TLS variable g will not be set, in which case runtime_lock will crash. Avoid the problem by using atomic operations for the lock. This is OK since creating a backtrace state is fast and never blocks. The test case is TestCgoExternalThreadSIGPROF in the runtime package on a system that getSiginfo doesn't handle specially. Updates golang/go#20931 Reviewed-on: https://go-review.googlesource.com/50650 From-SVN: r250439
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/MERGE2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index accb55f..efb2dd4 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-a9f1aeced86691de891fbf2a8c97e848faf1962e
+b712bacd939466e66972337744983e180849c535
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.