aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/proc.c')
-rw-r--r--libgo/runtime/proc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index de2a54b..47a472b 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -2454,6 +2454,15 @@ runtime_sigprof()
return;
}
n = 0;
+
+ if(runtime_atomicload(&runtime_in_callers) > 0) {
+ // If SIGPROF arrived while already fetching runtime
+ // callers we can have trouble on older systems
+ // because the unwind library calls dl_iterate_phdr
+ // which was not recursive in the past.
+ traceback = false;
+ }
+
if(traceback) {
n = runtime_callers(0, prof.locbuf, nelem(prof.locbuf));
for(i = 0; i < n; i++)