aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-unwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/go-unwind.c')
-rw-r--r--libgo/runtime/go-unwind.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgo/runtime/go-unwind.c b/libgo/runtime/go-unwind.c
index 58cb270..158cbd0 100644
--- a/libgo/runtime/go-unwind.c
+++ b/libgo/runtime/go-unwind.c
@@ -792,7 +792,9 @@ bool
scanstackwithmap (void *gcw)
{
_Unwind_Reason_Code code;
+ runtime_xadd (&__go_runtime_in_callers, 1);
code = _Unwind_Backtrace (scanstackwithmap_callback, gcw);
+ runtime_xadd (&__go_runtime_in_callers, -1);
return code == _URC_END_OF_STACK;
}